Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I execute stored procedure in SQL-server
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP3
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
00963459
Message ID:
00964662
Vues:
7
Hi Surgey!

Thanks for the link. Using the following code I can access records as follows:
lcFile = "FILE NAME=" + "mydb.udl"
oConn = NEWOBJECT("adodb.connection")
oRecordSet = NEWOBJECT("adodb.recordset")

oConn.open(lcFile)

oRecordSet.open("select * from mytab",oConn)
? oRecordRet.fields(1).value
oRecordSet.MoveNext()
? orecordset.fields(1).value

This works fine. but how dow do I get this data into a grid or combo box.

***

Accessing the stored procedure I have used the following code:

lcFile = "FILE NAME=" + "mydb.udl"
oConn = NEWOBJECT("adodb.connection")
oComm = NEWOBJECT("adodb.command")
oRecordSet = NEWOBJECT("adodb.recordset")

oConn.open(lcFile)
WITH oComm
.commandtext = "select_mytab_1"
.activeconnection = oConn
.commandtype = 4
.execute
ENDWITH

How do I view the returned data? How can I attach this data to a grid or combo box.

I am really lost here. Really appreciate some help.
Stuart Reid

True nobility lies not in being superior to another man, but in being superior to one’s previous self
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform