Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLStringConnect & VFPOLEDB
Message
From
15/07/2005 07:26:11
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01032939
Message ID:
01032976
Views:
18
>I've been playing with VFPOLEDB and have a problem making a connection. I'm using SQLStringConnect to make my connection (I need to use it this way) but VFP keeps bringing up a dialog box asking for DSN - I don't want to use a DSN, I want to make a direct [variable] connection.
>
>Does anybody know why it's doing this (and how to stop it).
>
>TIA,

Nigel,
VFPOLEDB uses OLEDB as its name suggests not ODBC (and thus not ODBC connection string). ie:
oCon = createobject("AdoDb.Connection")
oCon.ConnectionString = "Provider=VFPOLEDB;Data Source=" + _samples +"data\testdata.dbc"
oCon.Open
oRS = oCon.Execute("select * from customer")
? oRS.Fields("Company").Value
oRS.Close
oCon.close
If however you still want to use ODBC connectionstring then use MSDASQL as provider (I don't suggest).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform