Hey guys,
I have the following issues with connecting to my DB using Perl. But first
some background:
I create my DB like:
CREATE DATABASE george_db_upp IN maindbs WITH BUFFERED LOG;
I use DBD::Informix version 1.00.PC2
Running IDS 9.3:
Here's my script:
--------------------
#!/usr/bin/perl
use strict;
use warnings;
use DBI;
my
$oDBHandle=DBI->connect('DBI:Informix:[EMAIL PROTECTED]','gkarabot','',{Ra
iseError=>1,AutoCommit=>0});
print(STDERR "FIRST COMMIT\n");
$oDBHandle->do('COMMIT WORK')||die($oDBHandle->errstr);
print(STDERR "SECOND COMMIT\n");
$oDBHandle->do('COMMIT WORK')||die($oDBHandle->errstr);
print(STDERR "PREPARE STATEMENT\n");
my $oSQLHandle=$oDBHandle->prepare('SELECT * from
asdfasdf')||die($oDBHandle->errstr);
$oDBHandle->disconnect();
------------------------
Here's the output from the server that only has the Informix client
installed:
(487)@tito/home/gkarabot/perl_tests > ./dbi_commit.pl
FIRST COMMIT
SECOND COMMIT
PREPARE STATEMENT
Use of uninitialized value in die at ./dbi_commit.pl line 15.
Died at ./dbi_commit.pl line 15.
Issuing rollback() for database handle being DESTROY'd without explicit
disconnect().
Here's the output from the server that has the Informix DB installed along
with the client, dbacces, etc:
(173)@larcius/home/gkarabot/perl_tests > ./dbi_commit.pl
FIRST COMMIT
SECOND COMMIT
PREPARE STATEMENT
DBD::Informix::db prepare failed: SQL: -206: The specified table (asdfasdf)
is not in the database.
ISAM: -111: ISAM error: no record found. at ./dbi_commit.pl line 15.
DBD::Informix::db prepare failed: SQL: -206: The specified table (asdfasdf)
is not in the database.
ISAM: -111: ISAM error: no record found. at ./dbi_commit.pl line 15.
Issuing rollback() for database handle being DESTROY'd without explicit
disconnect().
Basically I have two issues,
1) Why am I not getting error "-255 Not in transaction" error from the two
"COMMIT WORK" statements above?
2) Why when I run this script from tito, which has only the client
installed, I get an empty DBI->errstr value?
thank you in advance,
George