Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking Visual Fox Pro tables thru OBDC

Status
Not open for further replies.

MarshaPav

Programmer
Jun 25, 2001
25
0
0
US
I have an Access 2002 application where I link to several Visual Fox Pro tables. I want to be able to do the link with a Docmd.TransferDatabase.

The ODBC connection string looks like this on my current linked table:

ODBC;DSN=Visual FoxPro Tables;SourceDB=h:\Programs\Data;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;;TABLE=prckhist

My DoCmd statement looks like this:

DoCmd.TransferDatabase acLink, "ODBC Database", _
"ODBC;DSN='Visual FoxPro Tables';SourceDB=h:\Programs\Data;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;;TABLE=prckhist", acTable, "h:\Programs\Data\prckhist.dbf", "prckhist"

When I run the DoCmd, I am getting a message that says: ODBC connection to "Visual FoxPro Tables" failed. Do I have some syntax wrong? What else could the problem be?
 
do you have any security settings on the visual fox database? I don't see any username or password settings in the connection string

also, is your dsn for visual fox set up properly?

--------------------
Procrastinate Now!
 
The connection string I am using is what was generated when I built it from the Database Window, i.e. Tables/New/Link etc. So the dsn is OK and evidently it doesn't need any more security.
 
from the Database Window, i.e. Tables/New/Link etc.
With the Remember password option checked ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
No, the Save Password box was not checked.
The table build from the Database Window is working, built with the DoCmd, it is not.
 
So, create a new linked table with Save Password checked and have a look at the generated connection string.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top