Posted on 2006-10-24 12:58:37-07 by wfrerichs
Adding Large ASCII bigger than _PACKET_SIZE
How can I add large ASCII-Text into an Column defined as Long ASCII. I tried prepare-execute so far but I cannot add text bigger than the Parameter _PACKET_SIZE . Using JDBC it works fine.
$sdbquery="INSERT INTO T_DATA (IDGRIB, TXT, LEN) VALUES (?, ?, ?)"; my $sth1 = $maxdb->prepare($sdbquery) or die "$DBI->err \n $DBI->errstr \n"; $sth1->bind_param (1, $idgrib); $sth1->bind_param(2, $data); $sth1->bind_param (3, length($data)); $sth1->execute() or die "$DBI->err \n $DBI->errstr \n"; $sth1->finish;
or
$sdbquery="INSERT INTO T_DATA (IDGRIB, TXT, LEN) VALUES (?, ?, ?)"; my $sth1 = $maxdb->prepare($sdbquery) or die "$DBI->err \n $DBI->errstr \n"; my $ldata=length($data); $sth1->bind_param_inout(1, \$idgrib, 10); $sth1->bind_param_inout(2, \$data, 5000000); $sth1->bind_param_inout(3, \$ldata, 10); $sth1->execute() or die "$DBI->err \n $DBI->errstr \n"; $sth1->finish;
After adding several rows I can see only thos files which are smaller than _PACKET_SIZE.
select MAX(LEN) FROM T_DATA -> 88667 (_PACKET_SIZE = 90000) select MAX(LEN) FROM T_DATA -> 130010 (_PACKET_SIZE = 131072)
Werner Frerichs
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.