Hello, could you please send at least the stack backtrace of that exception. It would help alot.
Thanks Alexander Schroder SAP DB, SAP Labs Berlin > -----Original Message----- > From: rusanov [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 06, 2004 2:51 AM > To: [EMAIL PROTECTED] > Cc: Anhaus, Thomas > Subject: Error SapDB and JDBC > > > 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/[EMAIL PROTECTED] -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
