Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLStringConnect & VFPOLEDB
Message
De
15/07/2005 07:26:11
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01032939
Message ID:
01032976
Vues:
17
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform