Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use OLEDB?
Message
De
18/11/2003 13:51:25
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
How to use OLEDB?
Divers
Thread ID:
00851123
Message ID:
00851123
Vues:
43
I'm new to OLEDB.
I've set up connection in myform.Load(); see below.
How do I reference the fields?
Example: on a text field's controlsource, what do I need to put in?
(let's say that the field's name I want the text box to be tied to is lastName).

loConn= CREATEOBJECT('adodb.connection')
loComm = CREATEOBJECT('adodb.command')
loRS = CREATEOBJECT('adodb.recordset')

loRS.CursorLocation = 3
loRs.CursorType = 3

loConn.ConnectionString = ;
'Provider=VFPOLEDB.1;Data Source=mydata.dbc;Password="";Collating Sequence=MACHINE'

loConn.Open()
loComm.ActiveConnection= loConn
loComm.CommandText= 'select * from sp'
loRS = loComm.Execute()

myTextbox.ControlSource='loRs.lastName' ???????

Thank you all!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform