General information
Category:
Database DAO/RDO/ODBC/ADO
>Hi,
>
> Anybody help to create a table relation in ADO and im using a mdb database...
>
> Purchase ----> main table
> detail ----> link to purchase
> expense ----? link to purchase
>tia
>richard..
Hi Richatd.
Use the ADO SHAPE command to generate hierarchial recordset
Like this (you should check for syntax errors)
dim cn as new adodb.connection
dim rsmain as new adodb.recordset
with cn
.provider = "MSDataShape"
.cursorlocation = aduseclient
.connectionstrin = "your conn string"
end with
rsmain.source = "shape {select * from purchase } append ({select * from detail } as detail1 relate detailid to detailid)"
the same for second table.
Alex.
Previous
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