Re: multiple connections



Hi Kate,

You cannot use connection against one database to execute any SQL statements
against another database. You connection is limited in this case. I am not
sure about Oracle, but in a case of SQL Server when two databases reside on
a same server you could execute SQL statements against different database
specifying full qualified name to the databases, like

insert into Databasename1.dbo.TableName (select * from
Databasename2.dbo.TableName where name='abc')"

Could be that Oracle supports similar or same syntax
--
Val Mazur
Microsoft MVP

http://xport.mvps.org



"Kate" <Kate@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EB8A1962-0B8C-4E56-9EF6-6D61AADF5AA2@xxxxxxxxxxxxxxxx
>I have 2 connections to 2 databases (db1, db2)
>
> The connections are fine. But when I tried to do the following statement,
> I
> got an error:
> Public db1Conn As ADODB.Connection
> Public db2Conn As ADODB.Connection
> Public rs As ADODB.Recordset
> Set rs = db2Conn.Execute("insert into tableA@db2 (select * from tableA@db1
> where name='abc')")
>
> The error is 'ora-02019: connection description for remote database not
> found.'
> I think it's because when I Set rs = db2Conn.Execute... it only connects
> to
> db2 not db1. How to fix this problem? Thanks!
>
>
>


.



Relevant Pages

  • Re: ADO Connection Timeout
    ... so what happens when a connection failure forces one station to revert ... to a local database? ... Further, you *will* have contention issues, Jet does not support record ... to the central server, but you are willing to live with periods where it ...
    (microsoft.public.data.ado)
  • Re: ADO Connection Timeout
    ... When the first test is run, the results are stored in the central database. ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
    (microsoft.public.data.ado)
  • Re: SQL Server 2000 (Application) Role accessed through ADO.NET
    ... >> The database role claims to answer my ... >> through the Connection Object of ADO.NET ... Then I execute the SQL statement passed to the method ...
    (microsoft.public.sqlserver.security)
  • Re: ADO Connection Timeout
    ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
    (microsoft.public.data.ado)
  • Re: ADO Connection Timeout
    ... much rather write stored procedures and use server side cursors. ... local database, it is vital that I get the information to a central server. ... Once the connection is restored, ...
    (microsoft.public.data.ado)