Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connecting To VFP Database Using VFPOLEB
Message
From
25/03/2008 20:05:31
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01305538
Message ID:
01305540
Views:
11
>What's wrong with this?
>
>
>sDatabase = "c:\projects\mydatabase.dbc"
>sConnString = "Provider=vfpoledb.1;Data Source=" + sDatabase
>
>iHandle = SQLCONNECT(sConnString)
>
>IF iHandle > 0
>
>	? "Connect"
>	
>	SQLDISCONNECT(iHandle)
>
>ELSE
>	? "Unable to connect"
>ENDIF
>
>
>I'm getting "Connectivity error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"

OLEDB requires data access via ADO. The SQLCONNECT() family of commands is for ODBC only.

I believe CursorAdapters offer good support for OLEDB.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform