Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Different ways to connect to SQL server
Message
De
18/02/2004 11:30:58
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00877675
Message ID:
00878351
Vues:
17
>I was able to connect to my data source and execute a simple select statment. However, what is the syntax to call a stored procedure. What I used to use was:
>
> hConn=SQLConnect("pbisqlmemsales")
> lcsql="exec sp_ndcusage_xml ?memno,?ndcnum,?sdate,?edate"
> lnresult=SQLEXEC(hConn,lcsql,"testdata")
>
> Using the vfpcomm utility I used the rstocusror() function to take the record set to a cursor but how would I execute the stored procedure with the paramters?
>
>Thanks again
>Kelly
Local oConn as 'Adodb.connection', lcDataPath
lcDataPath = "c:\MyPath\MyData.dbc"
oConn = CreateObject('Adodb.connection')
oConn.ConnectionString = "Provider=VFPOLEDB.1;Data Source="+m.lcDataPath
oConn.Open
oRs = oConn.Execute("MyStoredProc(parm1,parm2,...)")
? oRs.Fields(0).Value
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform