|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
connecting to 2 tables in a mdb
<i><b>Originally posted by : andrew (harrison@tiscalinet.it)</b></i><br /><br />Up until now I've successfuly connected to a table in a file mdb using the following code:<br />------------------------------------------------------------<br />sql="select * from users where cat like '%"&cat&"%' and city like '%"&city&"%' and title like '%"&key&"%'Or text like '%"&key&"%'"<br /><br />Set OBJdbConnection = Server.CreateObject("ADODB.Connection")<br />OBJdbConnection.Open "driver={Microsoft Access Driver (*.mdb)};dbq=e:users??.com??.mdb"<br />Set RS=OBJdbConnection.Execute(sql)%><br />-----------------------------------------------------------<br /><br />What I want to know is how can I connect to more than one table in a mdb in order to display information from both?
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : J.Ramkrishna Murty (ramkrishna99@yahoo.com)</b></i><br />Try this<br />if u have to two tables having a particilar field common in both like product_id then u can try this<br /><br />sql="select * from users, users2 where user.product_id ="& 2<br />hope this will do try out. <br /><br /><br />------------<br />andrew at 10/13/2000 7:04:07 AM<br /><br /><br />Up until now I've successfuly connected to a table in a file mdb using the following code:<br />------------------------------------------------------------<br />sql="select * from users where cat like '%"&cat&"%' and city like '%"&city&"%' and title like '%"&key&"%'Or text like '%"&key&"%'"<br /><br />Set OBJdbConnection = Server.CreateObject("ADODB.Connection")<br />OBJdbConnection.Open "driver={Microsoft Access Driver (*.mdb)};dbq=e:users??.com??.mdb"<br />Set RS=OBJdbConnection.Execute(sql)%><br />-----------------------------------------------------------<br /><br />What I want to know is how can I connect to more than one table in a mdb in order to display information from both?
|
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > connecting to 2 tables in a mdb |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|