Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DSN-Less Connect to Access
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00222203
Message ID:
00222222
Views:
35
Thanks, Josh. I've got the creation and deletion of the data source going nicely per the MSKB articles you mentioned. Thanks. I've also successfully created the connection I need using SQLConnect and SQLDisConnect. I'll now see if I can figure out how to extract the data I need.

>Michael,
>
>It looks to me like you're somewhere in between a DSN-less connection and creating the data source on the fly. You could try connecting to Access using SQLSTRINGCONNECT() passing the connection string. I'm not sure, though, whether Access supports DSN-less connections. You could also use SqlConfigDataSource to create your own DSN. Take a look at http://support.microsoft.com/support/kb/articles/q142/2/16.asp for details on how to do this. In addition to what's mentioned in the article you may want to go to the ODBC control panel and create a file DSN with the options you want. You can then look at the file to see what the name of each parameter is. For example, you should use DBQ=F:\projects\accountg\data\printing\infortext.mdb to tell Access what database you want to use.
>
>>I'm trying to create a DSN-Less connection from VFP6 to Access tables.
>>
>>Here's what I have so far, but my connect string is clearly wrong:
>>
>>ConnectString ="Driver=Microsoft Access Driver;Backgroundfetch=Yes;Collate=Machine;Exclusive=No;SourceType=MDB;SourceFile=F:\projects\accountg\data\printing\infortext.mdb"
>>
>>declare integer SQLConfigDataSource in odbccp32 Integer, Integer, String, String
>>
>>lnSuccess=SQLConfigDataSource(0,1,"Microsoft Access Driver",ConnectString)
>>
>>What have I done wrong? Also, how will I refer to the 'table' via SQL?
>>
>>TIA
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Previous
Reply
Map
View

Click here to load this message in the networking platform