| 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 |
|
|
  | |  | Error SapDB and JDBC | Error SapDB and JDBC 2004-04-05 - By rusanov
Back 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)
|
|
 |