Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use OLEDB?
Message
From
18/11/2003 13:51:25
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
How to use OLEDB?
Miscellaneous
Thread ID:
00851123
Message ID:
00851123
Views:
44
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!
Next
Reply
Map
View

Click here to load this message in the networking platform