- Moderator
- #1
I have an ASP page that I'm writing, which I need to join two databases on.
In other words, Database 1 has a table called "UserToProjects", while Database 2 (on a different server) has the actual projects.
I need to do something like "SELECT projects.projectID, projects.UserID WHERE UserToProjects.UserID=7 INNER JOIN UserToProjects ON projects.UserID = UserToProjects.UserID"
The Join part is simple... but how do I open up two databases on a single recordset?
For example, I can do a:
SET myConnection = Server.CreateObject ("ADODB.Connection")
SET myConnection2 = Server.CreateObject("ADODB.Connection")
myConnection.Open = "DSN=UsertoProjects;"
myConnection2.Open = "DSN=projects;"
The problem comes in, of course, here....
rcdSet.Open strSQL, myConnection <---- only one connection...
Any thoughts?
Just my 2¢
"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."
--Greg
In other words, Database 1 has a table called "UserToProjects", while Database 2 (on a different server) has the actual projects.
I need to do something like "SELECT projects.projectID, projects.UserID WHERE UserToProjects.UserID=7 INNER JOIN UserToProjects ON projects.UserID = UserToProjects.UserID"
The Join part is simple... but how do I open up two databases on a single recordset?
For example, I can do a:
SET myConnection = Server.CreateObject ("ADODB.Connection")
SET myConnection2 = Server.CreateObject("ADODB.Connection")
myConnection.Open = "DSN=UsertoProjects;"
myConnection2.Open = "DSN=projects;"
The problem comes in, of course, here....
rcdSet.Open strSQL, myConnection <---- only one connection...
Any thoughts?
Just my 2¢
"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."
--Greg