Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
DBI connect('','donny@basetest',...) failed: ORA-12154: TNS:could not resolve
the connect identifier specified (DBD ERROR: OCIServerAttach) at C:\Documents a
nd Settings\doc\connection.pl line 10
#!/usr/bin/perl
use DBI;
$user = 'donny';
$password = 'ppp';
$dbconnectstring = 'basetest';
$dbh = DBI->connect('dbi:Oracle:',$user.'@'.$password,$dbconnectstring);
$sql_return = `sqlplus -s user/password << SQL_END
set linesize 80
set pagesize 10
set heading off
set feedback off
SELECT ID,NAME,LASTNAME
FROM EMPLOYEES
WHERE ( ID= '$id');
quit
SQL_END
`;
chomp($sql_return);
$sql_return = trim($sql_return);
my ($id,$name,$lastname)= split('\n',$sql_return);
sub trim {
my @out = @_;
for (@out) {
s/^\s+//; # trim left
s/\s+$//; # trim right
}
return @out == 1
? $out[0] # only one to return
: @out; # or many
}
$sql_return = `sqlplus -s user/password\@database << SQL_END
open FH, "echo 'select name from objects where object_class=3 and name is not null and object_instance is not null;\n' \| sqlplus -s user/password|";
while(<FH>) {
do whatever you want to do
}