MySQL Forums
Forum List  »  GIS

Posted by: Werner Frerichs
Date: October 25, 2006 12:59AM

Sorry, wrong Forum - should be in MySQL->MaxDB !!!

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.

$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";


$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";

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

Edited 1 time(s). Last edit at 10/25/2006 01:01AM by Werner Frerichs.

Options: ReplyQuote

Written By
October 25, 2006 12:59AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.