|
|
sybperl-l Archive
Up Prev Next
From: "Todd E dot Scheresky" <tscheresky at micron dot com>
Subject: Explicitly binding columns... How do I??
Date: Jun 3 1998 7:09PM
Folks,
I have problem which pertains to Open Client on Alpha VMS, and Sybperl.
There must be a Sybperl solution to this problem, though I am not sure
what it is. The problem is described as follows.
When I execute a stored procedure, or SQL statement, that returns a
numeric(9,0) from CTlib ( using the CTlib/Perl code found below ) Perl
dies a horrible death. The VMS error output follows the CTlib/Perl
code. Note: I am not doing any explicit binding in my Sybperl code, and
the same stored procedure executes fine in Sybperl on Windows NT 4.0 and
Unix. It has been determined that Open Client on Alpha VMS defaults to
binding a numeric to a IEEE floating point data type, instead of the
native VMS data type, which causes and overflow on Alpha architecture.
My question is how do tell Sybase Server, from Sybperl, to returns all
my result set as strings? What would be the most elegant Sybperl
solution to this problem?
Any help, or sane suggestion, is appreciated!!
-- CTlib/Perl Code Snippet --
$X->ct_execute("stored_procedure_here");
while ( ($rc = $X->ct_results($restype)) == CS_SUCCEED )
{
next if ( $restype == CS_CMD_DONE ||
$restype == CS_CMD_FAIL ||
$restype == CS_CMD_SUCCEED );
while(@dat = $X->ct_fetch)
{
if ( $restype == CS_ROW_RESULT )
{
foreach $val (@dat)
{
print "$val ";
}
print "\n";
}
if ( $restype == CS_STATUS_RESULT )
{
$resval = $dat[0];
}
}
}
-- VMS Error Message --
%SYSTEM-F-HPARITH, high performance arithmetic trap, Imask=00000000,
Fmask=00000002, summary=02, PC=00000000000ED15C, PS=0000001B
-SYSTEM-F-FLTINV, floating invalid operation, PC=00000000000ED15C,
PS=0000001B
Improperly handled condition, image exit forced.
Signal arguments: Number = 0000000000000006
Name = 0000000000000504
0000000200000000
0000000000000002
0000000000000002
00000000000ED15C
000000000000001B
Register dump:
R0 = 0000000000000000 R1 = 0000000000000002 R2 =
000000000004FC58
R3 = 00000000005B77B8 R4 = 0000000000000006 R5 =
0000000000000000
R6 = 0000000000000000 R7 = 0000000000000000 R8 =
0000000000000000
R9 = 000000007FFAC410 R10 = 0000000000000000 R11 =
000000007FFCE3E0
R12 = 0000000000000000 R13 = 000000007AFDA1E0 R14 =
0000000000000000
R15 = 00000000009C7253 R16 = 000000000018C068 R17 =
0000000000000001
R18 = 00000000000ED000 R19 = 0000000000000001 R20 =
0000000000000006
R21 = 0000000000000000 R22 = 0000000000000000 R23 =
0000000000040000
R24 = 0000000000000000 R25 = 0000000000000002 R26 =
00000000000EFF80
R27 = 000000000004FC38 R28 = 00000000000ED128 R29 =
000000007AEBB710
SP = 000000007AEBB710 PC = 00000000000ED15C PS =
100000000000001B
|