rgcosma has asked for the wisdom of the Perl Monks concerning the following question:
Wise monks,
I have a seemingly simple insert and can't figure whether the problem is in DBI or in freetds (asked there too, no feedback yet). Data is an e-mail in stdin
while (<STDIN>) {$orig .= $_; $count++; last if ($count>100 || /\w{70, +}/); chomp($orig);$orig=~s/\r//g;$orig=~s/\n/\t/g; #print STDERR $orig; $db1 = DBI->connect("dbi:Sybase:server=$dbserver;database=$dbase;", $u +ser, $passwd, { syb_err_handler => \&err_handler }) || exit 1; $st1 = $db1->prepare("insert into bounces (recipientid, documentid, bo +uncecode, bouncesubject, bounceheaders) values (?,?,?,?,?)") || exit +1; $st1->execute($recid, $docid, $msg, $subj, $orig) || exit 1;
The string, with newlines replaces by tabs, is there when printed, but in the db I only get the first 78 chars for field "bounceheaders":
Any hints on what goes wrong?From MAILER-DAEMON Mon Jun 14 08:54:23 2010 Return-Path: <> X-Origina +l-To: a2@e From MAILER-DAEMON Mon Jun 14 08:54:24 2010 Return-Path: <> X-Origina +l-To: a3@e
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: dbd::sybase string cut at 78 characters?
by Corion (Patriarch) on Jun 14, 2010 at 20:32 UTC | |
Re: dbd::sybase string cut at 78 characters?
by derby (Abbot) on Jun 14, 2010 at 22:22 UTC | |
by rgcosma (Beadle) on Jun 14, 2010 at 23:55 UTC | |
Re: dbd::sybase string cut at 78 characters?
by choroba (Cardinal) on Jun 14, 2010 at 20:35 UTC | |
Re: dbd::sybase string cut at 78 characters?
by Anonymous Monk on Jun 14, 2010 at 23:41 UTC | |
by derby (Abbot) on Jun 15, 2010 at 12:24 UTC | |
by Anonymous Monk on Jun 15, 2010 at 12:29 UTC | |
by rgcosma (Beadle) on Jun 15, 2010 at 00:01 UTC | |
Re: dbd::sybase string cut at 78 characters?
by mpeppler (Vicar) on Jun 24, 2010 at 20:13 UTC |
Back to
Seekers of Perl Wisdom