Bad int8 external representation "" (SQL-HY000) (DBD: st_execute/SQL_Execute err=-1

Bad int8 external representation "" (SQL-HY000) (DBD: st_execute/SQL_Execute err=-1

am 14.04.2006 21:13:40 von loopeter

Hi All,

I am reading in a pipe delimited file and using the while loop and
$sth->execute, I am trying to insert into a table, but am getting the
following error:

Bad int8 external representation "" (SQL-HY000) (DBD:
st_execute/SQL_Execute err=-1

Here is my sub-routine:

sub sub_executeBindFromInputFile($$$$) {
local ($dbDriver, $dbh, $sth, $fh) = @_;
my ($bindVar, @row);
my $count = 0;
$delimiter ||= "|";
$COMMITPOINT ||= 10000;
while (<$fh>) {
chomp;
@row = split(/\|/, $_);
unless ($sth->execute(@row)) {
$MESSAGE = $DBI::errstr;
$STATUS = $FAILURE;
sub_exit("Y", $dbDriver, $dbh);
}
if ($destIsOracle) {
$count++;
if ($count >= $COMMITPOINT) {
$s_dbh->commit || die "$DBI::errstr\n";
$count = 0;
}
}
}
print STDERR "RETURN STATEMENT HANDLE IS: $sth\n\n";
return($sth);
} #<=== (End of sub_executeBindFromInputFile)

When I handle the insert directly out of a select, it appears to work.
Can you please tell me what I am doing wrong?

Thanks.

Peter


Peter Loo
Worldwide Consulting, Inc.
Phoenix, Arizona
U.S.A.

Re: Bad int8 external representation "" (SQL-HY000) (DBD: st_execute/SQL_Execute err=-1

am 15.04.2006 04:31:52 von ron

On Fri, 14 Apr 2006 12:13:40 -0700 (PDT), Peter Loo wrote:

Hi Peter

> Bad int8 external representation "" (SQL-HY000) (DBD:
> st_execute/SQL_Execute err=3D-1

You need better diagnostic skills.

Print the data before you insert it.
Print a message saying that it has been inserted.
That way, we know what data failed to be inserted, /and we can see it/!
--
Cheers
Ron Savage, ron@savage.net.au on 15/04/2006
http://savage.net.au/index.html
Let the record show: Microsoft is not an Australian company

Re: Bad int8 external representation "" (SQL-HY000) (DBD: st_execute/SQL_Execute err=-1

am 16.04.2006 02:59:50 von loopeter

Hi Ron,

Yes, I should have sent more details, but I was just hoping that
someone has seen this and have a quick answer.

Peter

--- Ron Savage wrote:

> On Fri, 14 Apr 2006 12:13:40 -0700 (PDT), Peter Loo wrote:
>
> Hi Peter
>
> > Bad int8 external representation "" (SQL-HY000) (DBD:
> > st_execute/SQL_Execute err=-1
>
> You need better diagnostic skills.
>
> Print the data before you insert it.
> Print a message saying that it has been inserted.
> That way, we know what data failed to be inserted, /and we can see
> it/!
> --
> Cheers
> Ron Savage, ron@savage.net.au on 15/04/2006
> http://savage.net.au/index.html
> Let the record show: Microsoft is not an Australian company
>
>
>


Peter Loo
Worldwide Consulting, Inc.
Phoenix, Arizona
U.S.A.