Run 'perldoc DBI' and 'perldoc DBD::Oracle' to find out the correct
connect() syntax.  Hint: host=$remote_address

Ilya Sterin

-----Original Message-----
From: Antonio Hern�ndez
To: '[EMAIL PROTECTED]'
Sent: 05/04/2001 6:03 AM
Subject: RE: Connect Remote

I response to me :)

I forgot "dbi:"
my $dbh =
DBI->connect("dbi:$driver:$dbname\@$remote_address",$user,$passwd)
||
die "\nerror open data base: $DBI::errstr\n";

Now I have this error:

DBI->connect([EMAIL PROTECTED]:1527) failed: ORA-06401: NETCMN: invalid
driver designator (DBD ERROR: OCIServerAttach) at soltour-cgi line 30

Error al abrir la base de datos: ORA-06401: NETCMN: invalid driver
designator (DBD ERROR: OCIServerAttach)

Can you help me?

----------
Antonio Hern�ndez
Development Executive, IT Systems
RUMBO
C/Procion, 1-3 - 28023 - Madrid - Spain
Tlf.: (34)913.076.689 (EXT. 31038)
Fax: (34)913.728.550
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
http://www.rumbo.es <http://www.rumbo.es> 




-----Mensaje original-----
De: Antonio Hern�ndez [mailto:[EMAIL PROTECTED]]
Enviado el: Friday, May 04, 2001 1:36 PM
Para: '[EMAIL PROTECTED]'
Asunto: Connect Remote


I have this source code:
 
use DBI;
 
my $db_name = "name";
my $remote_address = "222.22.22.2:1527";
my $user = "usuario";
my $passwd = "contrase�a";
my $driver="Oracle";
my $sql_sentence="select * from all_tables";
 
my $dbh = DBI->connect("$driver:$dbname\@$remote_address",$user,$passwd)
||
die "\nerror open data base: $DBI::errstr\n";
 
my $sth = $dbh->prepare($sql_sentence);
 
$sth->execute();
 
and I have this error:
Can't connect( Oracle:[EMAIL PROTECTED]:1527
<mailto:Oracle:[EMAIL PROTECTED]:1527>  usuario contrase�a), no database
driver specified and DBI_DSN env var not set at perlcgi line 45 
line 45 is 
  my $dbh = DBI->connect(.....
 
can you help me?
 
 

----------
Antonio Hern�ndez
Development Executive, IT Systems
RUMBO
C/Procion, 1-3 - 28023 - Madrid - Spain
Tlf.: (34)913.076.689 (EXT. 31038)
Fax: (34)913.728.550
 <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
 <http://www.rumbo.es/> http://www.rumbo.es


 

Reply via email to