Connect two or more DB at the same time??
Hi,
I want to connect to a DBF database and a SQL database. But I am not sure this is possible, as trying it, it gives me errors.
i have:
=====
Set conn = server.createobject("adodb.connection")
conn.open "DSN=FARMA"
set rs = server.createobject("adodb.recordset")
Set conn2 = server.createobject("adodb.connection")
conn2.open "DSN=DATAFARMA"
set rs2 = server.createobject("adodb.recordset")
====
Then to call the sequence:
===
sql=" SELECT DISTINCT cinta,fecha,* FROM cintas_fichar WHERE COD_empleado="&Request.form("USUARIO")&" "
rs.open sql,conn
sql2="SELECT * FROM MAE_LAL WHERE COD_ALB='723702'"
rs2.open sql2,conn2
===
If I remove the SQL2 lines, it goes good. But adding them it won´t connect. Seperatly it goes well.
What I try to do is I get a data from one DB (SQL) and then with that data I search into a DBF DB.... can this be done?
Regards,
David
|