here is the connection i have
strCon="DBQ=" & Server.Mappath("db.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};PWD=password;"
set adoCon=server.createobject("adodb.connection")
adoCon.Open strCon
so in order to work with the 2 databases i have 2 adoCon and when i do the select i select from each db i need
now for the problem...
in this situation i will be able only to get all the info from one and then from the other one. but what i want is to be able to put the together.
db1.tblcats has categories and db2.tblcats has categories and subcategories
so in addition to be able to select both of the together, i need to be able to know what cat is from what db
Step 2 after the big help
this is my code
strSQL = "SELECT name FROM tblcats union " _
& "select name from [MS Access;PWD=pass;DATABASE=" & Server.Mappath("../shop.mdb") & "].tblcats as bcats where bcats.father=50"
rs.CursorType = 3
rs.LockType = 3
rs.Open strSQL, strCon
while not rs.eof
response.write rs("name")&"<br>"
rs.movenext
wend
how can i know what record came from what db? cause i need to act difrently for each one
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…