>I just found out that the package has taken all VFP deleted records on the process. How can I make sure that the deleted records are not imported into SQL Server? Or, should I have pack all my tables before doing the import?
Use a linked server based on ADO. Then all is easier using OpenQuery (and it automatically drops deleted ones - in fact with this approach you have problems if you also want the deleted records).
EXEC sp_addlinkedserver
@server = N'VFP_SERVER',
@srvproduct=N'Visual FoxPro 9',
@provider=N'VFPOLEDB',
@datasrc=N'"C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO 9\Samples\data\testdata.dbc"'
insert mySQLTable (orderId, orderDate,shippedTo)
Select * From openquery(VFP_SERVER,
'Select
order_ID,
Cast(Evl(order_date,Null) As DateTime) As order_Date,
TRIM(to_Name)
from customer')
Linked server has 2 primary advantages in your case:
1) It automatically drops deleted
2) OpenQuery allows you execute VFP syntax for VFP and SQL syntax for SQL side.
Cetin