Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:16 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.