How do I add orders from another data folder into my current database?

 

If you are using the Visual Foxpro database as opposed to the MySql database for your Sophio webstore the commands below will get you started.

The commands below can be put into a new program called updateorders.prg that you create in visualfoxpro with the command modify command updateorders.prg

set default to d:\wconnect\clientname\data\otherdatafolder\
set exclusive off

SELECT * FROM wws_invoice WHERE pk NOT in (SELECT pk FROM \wconnect\ciientname\data\wws_invoice)
COPY TO \wconnect\ciientname\data\addinvoice
SELECT * FROM wws_customers WHERE pk NOT in (SELECT pk FROM \wconnect\ciientname\data\wws_customers )
COPY TO \wconnect\ciientname\data\addcustomers
SELECT * FROM wws_lineitems WHERE pk NOT in (SELECT pk FROM \wconnect\ciientname\data\wws_lineitems )
COPY TO \wconnect\ciientname\data\addlineitems
SELECT * FROM wws_tlineitems WHERE pk NOT in (SELECT pk FROM \wconnect\ciientname\data\wws_tlineitems )
COPY TO \wconnect\ciientname\data\addtlineitems
set default to d:\wconnect\clientname\data
CLOSE ALL
USE wws_invoice
APPEND FROM addinvoice
USE wws_customers
APPEND FROM addcustomers
USE wws_lineitems
APPEND FROM addlineitems
USE wws_tlineitems
APPEND FROM addtlineitems

 

 

Was this answer helpful? 0 Users Found This Useful (1 Votes)