>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