Frakkor wrote:
Elderon,
You can do it, but not all within .NET. You can only connect to one datasource at a time.
How this is commonly one is to connect to one database, build your dataset, then insert that into another database, with a new connection.
Outside of using middleware, or linked servers, you cannot connect to multiple databases with one connection object, at least in .NET.
EDIT:
This can be done with SQL 2005 Integration Services, which is part of SQL 2005 and VS.NET 2005. You can create multiple connections to data sources, create your transform packages, and load the data back into another database.
Sounds interesting. I've already solved the issue for the time being by simple opening one recordset, iterating through the records and writing them one-by-one to the other dataset until rs = EOF. It works very well, but I'd like to make it into a sexy single INSERT query because I'm hoping to gain performance.
KriegsmaschineVondentoten wrote:
Quote:
But can you make a cross DB query?
According to the folks here, yes, the ado object will allow you to query both the Oracle and SQL dbs as well as the text file as if it were a table. We use a similar approach for one of our cross DB applications where we use a text file to tie out 2 different tables in 2 different DBs.
can you get more info on this? I use the (ADODB) object and have multiple connections open at once, but the problem is that if you write a nice insert query from the defined table in connection "a" and want to just pop those records into connection "b", the problem is that the query has to be assigned to one connection only ie: rs.open strSQL,
db. Unless it is handled at the DB server like cross-DB queries in MSSQL where you specify the dbname.owner.table, how do you do it?
NephthysWanderer the Charming wrote:
This is the biggest uber geek circle-jerk I've ever seen.
Well uber geeks usually do have uber large penises, so it just makes logical sense.