DBD::Informix on Solaris



Hello List,

I have a working informix environment with DBI and DBD::Informix. (see details for version, configuration below).

I do have the problem that I cannot get the serial after a insert statement is executed.
I always get '0' back. In the database each inserted record gets a unique number assigned.

Why?

The code is as follows:
----------------------------------------------------------

# Vorbereiten des DBI/DBD::Informix Einfüge-Statements für das Importieren der Daten in die Informix-Datenbank
(my $sth = $dbh->prepare("INSERT INTO stammdatenkundeninfo (uid, firstname, lastname, formofaddress, title, email, phone, mobile, fax, company, orgshort, orglong, costcenter, type, nameaffix, room, building, street, postalcode, country, status) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"))
or die "${spacer_two}\nFehler: Vorbereiten des DBI/DBD::Informix Einfüge-Statements gescheitert -". $dbh->errstr() .."\n${spacer_two}\n";

(my $sth_upd = $dbh->prepare("Update stammdatenkundeninfo SET requestid = ? WHERE id = ?"))
or die "${spacer_two}\nFehler: Vorbereiten des DBI/DBD::Informix Update-Statements gescheitert -". $dbh->errstr() ."\n${spacer_two}\n";

# Durchlaufen der einzelnen Zeilen der CSV-Datei bis keine mehr da ist
my $anzahl=0;
while ($csv->get_row()) {

# Zuweisen der einzelnen Inhalte der aktuellen Zeile zu Variablen
(my $user_id, $first_name, $lastname, $form_of_adress, $title, $email, $phone, $mobile, $fax, $company, $orgshort, $orglong, $costcenter, $type, $nameaffix, $room, $building, $street, $postalcode, $country) = $csv->extract("User ID","First Name","Last Name","Form of Address","Title","E-Mail","Telephone","Mobile","Fax","Company","OrgShort","OrgLong","Cost Center","Type of Employement", "Name affix", "Room", "Building", "Street", "Postal Code", "Country")
or warn "${spacer_two}\nWarnung: Probleme beim Zuweisen der Spalten des CSV-Datensatz zu Variablen - ${!}\n${spacer_two}\n";


# Ausführen des DBI/DBD::Informix Einfüge-Statements mit den vorbereitenen Variablen
$@ ='';
eval{
$sth->execute($user_id, $first_name, $lastname, $form_of_adress, $title, $email, $phone, $mobile, $fax, $company, $orgshort, $orglong, $costcenter, $type, $nameaffix, $room, $building, $street, $postalcode, $country, "imported");
};
# Fehlerbehandlung
if ($@){
die "${spacer_two}\nFehler: Import des Datensatzes mit der User-ID \"${user_id}\" ist gescheitert -". $dbh->errstr() ."\n${spacer_two}\n";
}
else{
my $id = $sth->{ix_sqlerrd}[1];
printf ILOG "<%6s> %s (DB-ID: %10s)\n", $anzahl, "Import des Datensatzes mit der User-ID \"${user_id}\" war erfolgreich.", $id;
$anzahl++;

$sth_upd->execute($id, $id) or die "Update: $!";
}

}

----------------------------------------------------------







Bugreport-Info:

perl -V
---------------------------------------
Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris
uname='sunos solaris 5.8 generic_108528-11 sun4u sparc sunw,ultra-5_10 '
config_args='-Dcc=gcc -B/usr/ccs/bin/'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc -B/usr/ccs/bin/', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O',
cppflags='-fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='3.3.2', gccosandvers='solaris2.8'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib '
libpth=/usr/local/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'


Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under solaris
Compiled at Dec 2 2005 01:34:16
@INC:
/usr/local/lib/perl5/5.8.7/sun4-solaris
/usr/local/lib/perl5/5.8.7
/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris
/usr/local/lib/perl5/site_perl/5.8.7
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl


esql -v
---------------------------------------
IBM Informix CSDK Version 2.90, IBM Informix-ESQL Version 2.90.FC4
Software Serial Number AAA#B000000

dbaccess -V
----------------------------------------
DB-Access Version 9.21.UC6
Software Serial Number AAD#J179567


Govinda Pfister
Remedy Approved Consultant, Clarify Certified Consultant, ITIL-Certified

Projectcenter Business Process Solutions
Solution & Service Center Business Enabling Solutions
Global Competence Center
T-Systems Enterprise Services GmbH
Memmelsdorfer Str. 209a, 96052 Bamberg
+49 951 4097-161 (Tel)
+49 951 4097-200 (Fax)
E-Mail: Govinda.Pfister <mailto:Govinda.Pfister@xxxxxxxxxxxxx> @t-systems.com
Internet: <http://www.t-systems.com/> http://www.t-systems.com







Relevant Pages

  • Re: DBD::Informix Build Error On 64bit AIX 5.2
    ... command line is screwing up something that Perl itself is relying on. ... > 5.2 using the IBM vac C compiler. ... > Configuring IBM Informix Database Driver for Perl DBI Version 2005.01 ...
    (perl.dbi.users)
  • Re: Why Informix is Best
    ... When adding raw disk space Oracle zeros out the whole raw disk space ... 2Gb chunks in a few seconds under Informix. ... sysmaster database allows monitor of the database via sql allowing you ... IBM Informix has direct to engineer support whereas Oracle pass you to ...
    (comp.databases.informix)
  • Re: ISM volume mount problem
    ... the "System Admin Guide/Refernce" manuals. ... IBM Informix Development Munich, Germany ... I've a problem with a volume in the ISM. ...
    (comp.databases.informix)
  • [Fwd: What is Cheetah 2 and how will it impact your business?]
    ... its nice to get an email from Ziff Davis about Informix and see pictures of people I know;) - Lester ... Join us for this live, interactive eSeminar roundtable discussion, directly from the IIUG Power conference in Overland Park, Kansas. ... Our discussion will be led by IBM Informix Lab Director Jerry Keesee, and will allow you the chance to interact with the IDS 'Power' team of architects. ... Register now for this exclusive event - and get the inside scoop on the latest and greatest from IBM Informix. ...
    (comp.databases.informix)
  • Re: DBD::Informix on Solaris
    ... I have a working informix environment with DBI and DBD::Informix. ... IBM Informix CSDK Version 2.90, ... Projectcenter Business Process Solutions ... T-Systems Enterprise Services GmbH ...
    (perl.dbi.users)