Hello Alexey, 

could you make a vtrace of the situation? Apparantly there's something wrong
with the function, as

::PARSE 'SQLCURS_2' 2005-09-29 15:47:19.800908 [0x0xa18be68]
SQL COMMAND:'select REG.test(?) quant from dbadmin.dual'
PARSE ID: 00525744 00000301 54002C00 [1]
PARAMETERS:
I   T              L    P   IO    N
1   FIXED          10   255 IN    ''
COLUMNS:
I   T              L    P   N
2   FIXED          5    0   'QUANT'

tries to tell that the input parameter is a FIXED(10, 255), which is
weird.

Regards
Alexander Schröder 

-----Original Message-----
From: Alexey Gaidukov [mailto:[EMAIL PROTECTED] 
Sent: Donnerstag, 29. September 2005 08:53
To: maxdb@lists.mysql.com
Subject: -10811 Numeric overflow for parameter/column (1)

MaxDB 7.6.00.16. SQLDBC 7.6.00.12. DBD-MaxDB-7.5.00.32 (original version 
from SAP)

create function test(p integer) returns smallint as
BEGIN
    return 1;
END;


my $dbi = DBI->connect("dbi:MaxDB:maxdb/DCDB?unicode=true", "reg", 
"123") or die "connecting: $DBI::errstr";
my $sth = $dbi->prepare("select REG.test(?) quant from dbadmin.dual") or 
die "preparing: $DBI::errstr";
$sth->bind_param(1,153);
$sth->execute or die "executing: $DBI::errstr";
while(my $hash_ref = $sth->fetchrow_hashref) {
    my $id = $hash_ref->{QUANT};
    print "$id\n";
}
$sth->finish;




DBD::MaxDB::st execute failed: Numeric overflow for parameter/column (1) 
at ./test.pl line 17.
executing: Numeric overflow for parameter/column (1) at ./test.pl line 17.



<html><head><meta http-equiv="Content-Type" content="text/html; 
charset=utf-8"></head><body><PRE><PLAINTEXT>SQLDBC 7.6.
0 BUILD 012-121-102-632 Jul 18 2005 22:15:53
--- THREAD 1 --- 2005-09-29 15:47:19.780592 ---

2005-09-29 15:47:19.780787 [0x0xa183a30]
SERVERNODE: 'maxdb'
SERVERDB  : 'DCDB'
USER      : 'REG'
CONNECT PROPERTIES: (1 entry)
  KEY: 'UNICODE' VALUE: 'true'
CONNECT COMMAND: 'CONNECT ? IDENTIFIED BY ? SQLMODE INTERNAL'
SESSION ID: 1
OK
::SET AUTOCOMMIT ON 2005-09-29 15:47:19.800304 [0x0xa183a30]

::PARSE 'SQLCURS_2' 2005-09-29 15:47:19.800908 [0x0xa18be68]
SQL COMMAND:'select REG.test(?) quant from dbadmin.dual'
PARSE ID: 00525744 00000301 54002C00 [1]
PARAMETERS:
I   T              L    P   IO    N
1   FIXED          10   255 IN    ''
COLUMNS:
I   T              L    P   N
2   FIXED          5    0   'QUANT'

::BIND PARAM 2005-09-29 15:47:19.802798 [0x0xa18be68]
I   T          AT L          I          D          P
1   ASCII       T 4          0x0A18C1BC 0x0A18C1C8 0x00000000

::EXECUTE 'SQLCURS_2' 2005-09-29 15:47:19.802900 [0x0xa18be68]
PARSE ID: 00525744 00000301 54002C00 [1]
SQL COMMAND: 'select REG.test(?) quant from dbadmin.dual'
INPUT PARAMETERS:
APPLICATION
I   T          AT L          I           DATA
SQL ERROR  :
  CODE     : -10811
  MESSAGE  : Numeric overflow for parameter/column (1)
1   ASCII       T 4          NTS         '153' ***OVERFLOW ***

::CLOSE CONNECTION 2005-09-29 15:47:19.804778 [0x0xa183a30]

::EXECUTE DBS 'SQLCURS_1' 2005-09-29 15:47:19.804842 [0x0xa181880]
SQL COMMAND : 'ROLLBACK WORK RELEASE'

::RELEASE CONNECTION 2005-09-29 15:47:19.805993 [0x0xa183a30]



-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to