Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connecting To VFP Database Using VFPOLEB
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01305538
Message ID:
01305561
Views:
9
Maybe I'm going about all this wrong.

I'm trying to test a connection before moving it to C#. I want to access a DB, get back a list of tables, stored
procedures, views and relations. I was hopign to try it here first.






>You should use SQLSTRINGCONNECT() in this case.
>Do you have VFP ODBC driver on the PC?
>Keep in mind that VFP ODBC driver does not support any new features introduced after VFP6SP5.
>
>>
>>I tried this
>>
>>
>>CLEAR
>>
>>sDatabase = "C:\Projects\mydatabase.dbc"
>>sConnString = "Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;SourceDB="+sDatabase+";
>Exclusive=No; NULL=NO;Collate=Machine;BACKGROUNDFETCH=NO;DELETED=NO;"
>>
>>iHandle = SQLCONNECT(sConnString, .T.)
>>
>>IF iHandle > 0
>>
>>	? "Connect"
>>	
>>	SQLDISCONNECT(iHandle)
>>
>>ELSE
>>
>>	? "Unable to connect"
>>	AERROR(aErrInfo)
>>	? aErrInfo[1]
>>	? aErrInfo[2]
>>	
>>	_cliptext = aErrInfo[2]
>>	
>>ENDIF
>>
>>
>>I got "Connectivity error: [Microsoft][ODBC Driver Manager] Data source name too long"
>>
>>I got the connection string info from http://www.connectionstrings.com/?carrier=visualfoxpro
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform