Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorAdapter with SQL and parameter
Message
De
23/09/2004 06:14:07
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
22/09/2004 15:01:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00944961
Message ID:
00945294
Vues:
28
>Hi Cetin and Doug,
>
>There is an easier way to pass parameters using CursorAdapter, it handles parameters similar to SPT.
>
>
>CLOSE DATABASES ALL
>CLEAR
>
>customerid='ALFKI'
>
>LOCAL oCA as CursorAdapter
>
>oCA=CREATEOBJECT("CursorAdapter")
>oCA.SelectCmd="select * from Northwind..Orders where customerID = ?m.customerid"
>
>?"ODBC"
>oCA.DataSourceType="ODBC"
>oCA.DataSource=SQLCONNECT("localServer")
>
>IF oCA.DataSource<1
>	?"Failed to connect."
>ELSE
>	?oCA.CursorFill()
>	LIST
>	USE
>	SQLDISCONNECT(oCA.DataSource)
>ENDIF
>
>?
>?"ADO"
>
>LOCAL oConn as ADODB.Connection, oRS as ADODB.Recordset, oCom as ADODB.Command
>
>oConn=CREATEOBJECT("ADODB.Connection")
>oConn.Open("Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Data Source=(local)")
>
>oRS = CREATEOBJECT("Adodb.RecordSet")
>oRS.ActiveConnection = oConn
>
>oCom = CREATEOBJECT("Adodb.Command")
>oCom.ActiveConnection = oConn
>
>oCA.DataSourceType="ADO"
>oCA.DataSource=oRS
>
>?oCA.CursorFill(,,,oCom)
>LIST
>USE
>
>
>Thanks,
>Aleksey.

Hi Aleksey,
Thanks for reminding:) I don't know what was I thinking when I posted it.
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