#DEFINE ODBC_ADD_DSN 1 * accessign VFP free tables in a directory cDriver = "Microsoft Visual FoxPro Driver" cAttributes =; "DSN=NewVFP2" + Chr(0) +; "Description=Sample VFP Data Source" + Chr(0) +; "SourceDB=C:\data\vfp\payroll" + Chr(0) +; "SourceType=DBF" + Chr(0) +; "Collate=Machine" + Chr(0) +; "BackgroundFetch=Yes" + Chr(0) +; "Exclusive=No" + Chr(0) hWindow = GetActiveWindow() IF SQLConfigDataSource(hWindow,; ODBC_ADD_DSN, cDriver, cAttributes) = 0 = MessageBox("Error!", 48, " Error") ENDIFHope it helps.