Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Multiple Explicite Connections (Embedded SQL)

Multiple Explicite Connections (Embedded SQL)

From: Niels Lippke <c0032019_at_ws.rz.tu-bs.de>
Date: Wed, 10 Feb 1999 14:29:41 +0100
Message-ID: <Pine.HPX.4.05.9902101406020.3141-100000@rznb33.rz.tu-bs.de>

Hi,

I want my C-program to make n connections to one database. So, concerning to the pro*c programmers´s guide, you´ll have to write something like the following:

...

strcpy(db_string, "NYNON");
for (i=0; i<n; i++) {
  /* connect to the non-default database */   printf("Database name: ");
  gets(db_name);
  EXEC SQL CONNECT :username IDENTIFIED BY :password

       AT :dbname USING :db_string;
}
...

So, if I´m right ´dbname´ is just a name for the connection (to differ between several cons) and ´db_string´ is a SQL*Net string that gives us the destination node to connect to.

For single connections I usually use the default connection. But that doesn´t work for multiple connections. So I have to use the SQL*net string. But I don´t understand the syntax of this string. I read something like ´d:node´ where d specifies the non-default databa= se
and node specifies the remote node (???). Another example says:
The syntax for connecting to a non-default database on a remote node via DECnet is ´d:node-database´ (´d´ stands for DECnet ???).

Has anyone a simple example of an SQL*net string he uses so I can see what I´ve to do?
Where can I find information which nodes are specified for SQL*net to use? In other words where is the SQL*Net configured?

Regards, Niels



University of Technology, Braunschweig
N.Lippke_at_tu-bs.de Received on Wed Feb 10 1999 - 07:29:41 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US