DBI problem -- storing large value into an INT8 field

I'm having trouble using the DBI module
with an INFORMIX database. I have a table
with a column variable called "filesize" defined
as INT8. Given a value greater than 2**31,
say 4154628096, that I want to store into it,
if I code

$S = $dbk->prepare("UPDATE stat_daily SET filesize = 4154628096")
$S->execute();

....this will store the correct value. But if I code

$Size = 4154628096;
$S = $dbk->prepare("UPDATE stat_daily SET filesize = ?");
$S->execute($Size);

....it stores a meaningless value. Our version of Perl is not
64-bit enabled and upgrading is not an option. We get away
with doing precise integer arithmetic with large values
within our scripts presumably because Perl's native floating
point uses a large number of fraction bits. But that fact
doesn't help me here. Is there a workaround? (If there's
anything in perldoc DBI on this, I've missed it...)

--
Charles Packer
mailboxATcpacker.org
mailbox [ Do, 04 Januar 2007 16:28 ] [ ID #1585122 ]
Perl » comp.lang.perl.modules » DBI problem -- storing large value into an INT8 field

Vorheriges Thema: Apache2::RequestIO::read: timeout error
Nächstes Thema: [RFC] Log::Dispatch::FileX