problems with perl and informix
Posted in 2006
Hi, we have a problem using perl with Informix: We loose the last character of text strings when inserting varchar- and text-values with perl in a single statement. OS: Linux CentOs release 4.1 (like Redhat) IDS: 9.40.UC7 SDK: 2.90.UC3 Perl: 5.8.5 DBI: 1.50 DBD: 2005.02 We have tables with varchar and text columns. When inserting values for the varchar and text columns together, the last character of each varchar column gets lost: push @values,"1234" ; push @values,"abcd" ; push @values,"very long text" ; $sql = "insert into table1 (vchar_col1,vchar_col2,text_col) values (?,?,?)"; $sqlh = $dbh->prepare($sql); $sqlh->execute(@values); $dbh->commit(); No error, but 'select * from table1' returns: 123 abc very long text If the 'insert into' only contains the two varchar columns, then the select returns the correct result: 1234 abcd Has anyone seen this before? Is this a known bug (either of perl or of Informix SDK)? It seems to be version dependent (doesn't reproduce on HPUX, SDK 2.50, Perl 5.6.0, DBI 1.20, DBD 1.00.PC1) Any suggestions for workarounds (other than splitting into two insert-statements)? Regards, Andreas Kutsche ------------------------------------------- SPAR Oesterreichische Warenhandels-AG Hauptzentrale Europastrasse 3 A - 5015 Salzburg Tel: +43 662 4470 24223 Mobile: +43 664 6259575 E-Mail: Andreas.KUTSCHE@spar.at Internet: http://www.spar.at Wichtiger Hinweis: Der Inhalt dieser E-Mail kann vertrauliche und rechtlich geschützte Informationen, insbesondere Betriebs- oder Geschäftsgeheimnisse, enthalten, zu deren Geheimhaltung der Empfänger verpflichtet ist. Die Informationen in dieser E-Mail sind ausschließlich für den Adressaten bestimmt. Sollten Sie die E-Mail irrtümlich erhalten haben so ersuchen wir Sie, die Nachricht von Ihrem System zu löschen und sich mit uns in Verbindung zu setzen. Über das Internet versandte E-Mails können leicht manipuliert oder unter fremdem Namen erstellt werden. Daher schließen wir die rechtliche Verbindlichkeit der in dieser Nachricht enthaltenen Informationen aus. Der Inhalt der E-Mail ist nur rechtsverbindlich, wenn er von uns schriftlich bestätigt und gezeichnet wird. Sollte trotz der von uns verwendeten Virus-Schutzprogramme durch die Zusendung von E-Mails ein Virus in Ihre Systeme gelangen, haften wir nicht für evtl. hieraus entstehende Schäden. Wir danken für Ihr Verständnis. Important notice: The contents of this e-mail may contain confidential and legally protected information that is in particular related to operational and trade secrets, which the recipient is obliged to treat as confidential. The information in this e-mail is made available exclusively for use by the addressee. In the event that the e-mail may have been sent to you in error, we would ask you to kindly delete this communication from your system and to contact us. E-mails sent via the Internet can be easily manipulated or sent out under someone else's name. We therefore do not accept legal liability for the information contained in this communication. The contents of the e-mail are only legally binding if they have been confirmed and signed by us in writing. If, in spite of our using Antivirus protection software, a virus may have penetrated your system through the sending of this e-mail, we do not accept liability for any damage that may possibly arise as a result of this. We trust that you appreciate our position. -------------------------------------------