Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 31st, 2006, 06:32 AM
Authorized User
 
Join Date: Nov 2005
Location: , , Spain.
Posts: 72
Thanks: 3
Thanked 0 Times in 0 Posts
Default 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




Similar Threads
Thread Thread Starter Forum Replies Last Post
need guideline about connect to DB Jose P ADO.NET 2 May 9th, 2007 11:57 AM
How to connect to DB rtr1900 VB Databases Basics 4 December 5th, 2006 03:36 PM
Connect to DB hernann C# 2005 2 July 31st, 2006 05:06 PM
connect to sql db jopay Visual C++ 0 January 12th, 2005 05:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.