Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLE DB Connection string and ADO object commands
Message
De
22/03/2006 17:27:32
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
22/03/2006 10:27:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Divers
Thread ID:
01106640
Message ID:
01106820
Vues:
19
>I'm having all kinds of trouble figuring out how to install and find a basic ASP script to talk to VFP data from ASP.
>
>here is my ASP code I'm trying to use:
>
>lcSelectClause = "SELECT Dname from dealer"
>CrownDBC_ConnectionString = "Provider=VFPOLEDB.1;Data Source=i:\crown01\crownweb.dbc"
> CrownDBC_ConnectionTimeout = 15
> CrownDBC_CommandTimeout = 30
> CrownDBC_CursorLocation = 3
> CrownDBC_RuntimeUserName = ""
> CrownDBC_RuntimePassword = ""
> Set MyConn = Server.CreateObject("ADODB.Connection")
> MyConn.ConnectionTimeout = CrownDBC_ConnectionTimeout
> MyConn.CommandTimeout = CrownDBC_CommandTimeout
> MyConn.Open CrownDBC_ConnectionString, CrownDBC_RuntimeUserName, CrownDBC_RuntimePassword
>
> Set cmdTemp = Server.CreateObject("ADODB.Command")
> Set dataset = Server.CreateObject("ADODB.Recordset")
> cmdTemp.CommandText = lcSelectClause
> cmdTemp.CommandType = 1
> Set cmdTemp.ActiveConnection = MyConn
> dataset.Open cmdTemp, , 1, 3
>
>I'm getting an error on the "Set CmTemp.ActiveConnection = MyConn". I assume this means that the vfpoledb provider is available or it would have errored on the MyConn.Open command.
>
>
>I've used this ADO structure with ODBC for about five years now without any problems so it's kind of rough now going back in and trying to do it a new way.
>
>Any help is MUCH appreciated!

Remove set.
cmdTemp.ActiveConnection = MyConn

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