General information
Category:
ActiveX controls in VFP
Cetin:
Here is what you do:
(1) create DSN in ODBC setup to VFP Database
(2) create an msdatashape provider by right clicking desktop, file new MS Data Link, under connection tab add DSN to 'Data Source'. Test Connection.
oConn=createobject('adodb.connection')
oRs =createobject('adodb.recordset')
oConn.provider = 'msdatashape'
oConn.open('igcms')
shape = "shape {select * from cases order by caseno} " + ;
"append ({select * from people} relate pk_cases to fk_cases) as people"
oRs.open(shape, oConn)
The cases table is related to the people table on pk_cases = fk_cases
* get case fields
?oRs.fields('some_field_from_cases_table').value
* get matching people fields
x=oRs.fields('people').value
?x.fields('some_field_from_people_table').value
I just tried it for the first time and it worked.
Charlie
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only