Help me please ...
I want connect to DB Oracle by emperl but i don't .
The results ... don´t show me errors, don´t show anything in variable (ej
[ +$campo1+])
My scritp is:
[!
#Variables de entorno
use DBI;
!]
[-
$db_user = 'xxx'; #DB_USER;
$db_passwd = 'yyy'; #DB_PASSWORD;
$db_id = 'ECOMM'; #SID;
$db_driver = "dbi:Oracle:";
$fields = '*'; #Campos de la tabla para el select;
$tabla = 'proveed'; #nombre de la tabla;
$where = ''; #clausula del where para el select;
-]
<html>
<head>
<title>
</title>
[- #Para que EmbPerl no escapee las comillas
$escmode = 0 -]
<meta HTTP-EQUIV="Expires" CONTENT="">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" link=FF0000 vlink=FF0000>
[-
#Armado de la query
#connect to database
$dbh = DBI->connect($db_driver . $db_id,$db_user,$db_passwd,{ AutoCommit => 0 });
#prepare the sql select
$sth = $dbh -> prepare ("SELECT $fields FROM $tabla");
#execute the query
$sth -> execute;
($campo1, $campo2, $campon) = $sth->fetchrow_array;
$sth->finish;
$dbh->disconnect();
-]
Corremos con DEBUG
<p>
dbh: [+ $dbh +]<br>
sth: [+ $sth +]<br>
Campo1: [+ $campo1 +]<br>
Campo2: [+ $campo2 +]<br>
Campon: [+ $campon +]<br>
</body>
</html>
My configuration is
Row Var Content
0 SERVER_SOFTWARE Apache/1.3.12 (Unix) mod_perl/1.22 mod_ssl/2.6.2 OpenSSL/0.9.5
1 DOCUMENT_ROOT /app/webs/acag/html
2 GATEWAY_INTERFACE CGI-Perl/1.1
3 ORACLE_PATH
/app/oracle/product/8.1.6/bin:/app/oracle/product/8.1.6/obackup/bin:/opt/bin:/bin:/usr/bin
4 REMOTE_ADDR 10.101.3.147
5 REQUEST_METHOD GET
6 SESSION_FILE_LOCK 1
7 QUERY_STRING
8 HTTP_ACCEPT application/vnd.ms-excel, application/msword,
application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
9 ORACLE_BASE /app/oracle
10 REMOTE_PORT 3459
11 SERVER_ADDR 10.1.4.210
12 HTTP_ACCEPT_LANGUAGE es
13 MOD_PERL mod_perl/1.22
14 ORA_NLS32 /app/oracle/product/8.1.6/ocommon/nls/admin/data
15 nokeepalive 1
16 HTTPS on
17 ORA_NLS33 /app/oracle/product/8.1.6/ocommon/nls/admin/data
18 SCRIPT_FILENAME /app/webs/acag/html/min/trash/ambiente.epl
19 SERVER_NAME wwwserver1.telecompersonal.com.ar
20 SERVER_PORT 443
21 PATH_TRANSLATED /app/webs/acag/html/min/trash/ambiente.epl
22 ORACLE_HOME /app/oracle/product/8.1.6
23 SERVER_ADMIN [EMAIL PROTECTED]
24 SERVER_SIGNATURE <ADDRESS>Apache/1.3.12 Server at
wwwserver1.telecompersonal.com.ar Port 443</ADDRESS>
25 SERVER_PROTOCOL HTTP/1.0
26 HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)
27 PATH /sbin:/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/bin/X11:/usr/local
28 ssl-unclean-shutdown 1
29 HTTP_CONNECTION Keep-Alive
30 SCRIPT_NAME /min/trash/ambiente.epl
31 ORACLE_SID ECOMM
32 SESSION_FILE_DIRECTORY /app/webs/acag/html/acag/sessions
33 REQUEST_URI /min/trash/ambiente.epl
34 HTTP_COOKIE num=banco000; SITESERVER=ID=3fda4ee64dc8ad5c13552b8412dae598;
RMID=c82d480a3a6f0fd0
35 HTTP_HOST wwwserver1.telecompersonal.com.ar
What is wrong ? PLEASE ...
Thanks a lot;
Aldo Luis Orsini...
Buenos Aires
Argentina