comp.lang.ada
 help / color / mirror / Atom feed
* Many Database Connections
@ 2011-01-27 17:00 Elie Zgheib
  2011-01-27 21:37 ` Emmanuel Briot
  0 siblings, 1 reply; 5+ messages in thread
From: Elie Zgheib @ 2011-01-27 17:00 UTC (permalink / raw)


Hello everybody!

I am trying to write a code that maintains 2 connections to 2
different databases (on the same server).
The databases are is Postgre and I am using GnatColl to interface with
the servers and execute queries.

The problem I am having is that after executing a query on one of the
databases by using connection, the subsequent queries will be executed
to that same database even if I am using different connections.

To clarify this, imagine that I have 2 Databases, DB1 and DB2. I have
2 Gnatcoll databases connectors pointing to each one, lets say DB1_Con
for the connector to DB1, and DB2_Con for the other. I execute the
query on DB1 by calling Execute (DB1_Con, "INSERT t1 ...."), then call
the procedure Execute (DB2_Con, "INSERT t2..."). The second call to
Execute will fail because it tried to insert in DB1 and since DB1 does
not have a t2 table, it fails!!!

Has anybody experienced this? or has anybody successfully done this?
if so how? Any advise on what to look for while doing this sort of
stuff?

Thanks guys

Elie



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-31 14:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-27 17:00 Many Database Connections Elie Zgheib
2011-01-27 21:37 ` Emmanuel Briot
2011-01-28 12:10   ` iloAda
2011-01-28 15:22     ` Emmanuel Briot
2011-01-31 14:12       ` iloAda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox