Anyone know the correct syntax for establishing an ODBCDirect connection from Excel97 to VFP6 DBC?
Here's what I've tried that didn't work:
=======================================================
Dim wrkODBC As Workspace
Dim conVFP As Connection
' Create ODBCDirect Workspace object.
Set wrkODBC = CreateWorkspace("NewODBCWorkspace", _
"admin", "", dbUseODBC)
*** HERE'S THE MSFT EXAMPLE FROM EXCEL VBA HELP ***
' Set conPubs = wrkODBC.OpenConnection("Connection1", _
' dbDriverNoPrompt, , _
' "ODBC;DATABASE=pubs;UID=sa;PWD=;DSN=Publishers")
*** HERE'S MY SETUP ***
Set conVFP = wrkODBC.OpenConnection("VFPTest", _
dbDriverNoPrompt, , _
"ODBC;DATABASE=TestData;UID=;PWD=;DSN=E:\Projects\Test\Data\TestData;")
*** BY SETTING OPTIONS TO dbDriverPrompt I was able to establish a connection to the above DNS. From the VBA "Watches" window, I copied the "connect" string shown below: ***
Set conVFP = wrkODBC.OpenConnection("VFP1", _
dbDriverNoPrompt, , _
"ODBC;Driver={Microsoft Visual FoxPro Driver};" _
& "UID=;PWD=;SourceDB=E:\Projects\Test\data\TESTDATA.DBC;" _
& "SourceType=DBC;Exclusive=No;" _
& "BackgroundFetch=Yes;Collate=Machine;")
========================================================
This didn't work either. The only error msg I get is "ODBC Failed. Check your spelling..."
Any Ideas?
TIA,
jmu
Best Regards,
Jim Underwood
Apollo Information Systems, Inc.
Houston, TX