Mailing List
Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
MySQL++ - Programming with the C++ API to MySQL
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Error SapDB and JDBC

Error SapDB and JDBC

2004-04-05       - By rusanov

 Back
Reply:     1     2  

Hello, I'm using MaxDB 7.5.01.00 build 000-101-062-034

my database create with UNICODE = YES

I using for work with database jdbc 7.5.01.00

my connection string  connectionString='jdbc:sapdb://ufo/labu?unicode=true'


for binding parameters I call
   setInt(1, filter);
   setString(2, from);
   setString(3, to);

I have error

java.lang.ClassCastException:
com.sap.dbtech.jdbc.translators.GetvalUnicode$Reader

if I write my procedure without 2 , 3 parameters ?call its , procedure work
ok.

my store procedure

CREATE DBPROC LAB.get_filtered_events
( IN filter INT
, IN sFrom VARCHAR(30)
, IN sTo VARCHAR(30)
)
RETURNS CURSOR AS
VAR sqlCmd VARCHAR(1000);
condition VARCHAR(1000);
flag INT;
from timestamp;
to timestamp;
SET flag = 0;
SET from = NULL;
SET to = NULL;
BEGIN
TRY
set from = TIMESTAMP(sFrom);
set to = TIMESTAMP(sTo);
CATCH
STOP ($rc, $errmsg);
$CURSOR = 'FILTEREDEVENTS_CURSOR';
SET sqlCmd = 'DECLARE ' || $CURSOR || ' CURSOR FOR select * from
LAB.v_all_events ';
if filter is not null then begin
try
select condition from LAB.filter_conditions where filter = :filter;
WHILE $rc = 0 DO BEGIN
FETCH INTO :condition;
if flag = 0 then begin
SET flag = 1;
SET sqlCmd = sqlCmd || ' where ' || condition;
end
else begin
SET sqlCmd = sqlCmd || ' and ' || condition;
end;
END;
catch
IF $rc <> 100 THEN STOP ($rc, $errmsg);
end;
if from is not null then begin
if flag = 0 then begin
SET flag = 1;
SET sqlCmd = sqlCmd || ' where EVENT_TIME >= ''' || from || '''';
end
else begin
SET sqlCmd = sqlCmd || ' and EVENT_TIME >= ''' || from || '''';
end;
end;
if to is not null then begin
if flag = 0 then begin
SET flag = 1;
SET sqlCmd = sqlCmd || ' where EVENT_TIME <= ''' || to || '''';
end
else begin
SET sqlCmd = sqlCmd || ' and EVENT_TIME <= ''' || to || '''';
end;
end;
/*
SET sqlCmd = sqlCmd || ' ORDER BY ID';
*/
execute sqlCmd;
END;


--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/maxdb?unsub=mysql@(protected)