If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Query working with CLI Native driver giving error with JDBC Type 4 Universal Driver

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-18-08, 08:23
rahulj rahulj is offline
Registered User
 
Join Date: Sep 2008
Posts: 2
Query working with CLI Native driver giving error with JDBC Type 4 Universal Driver

While executing some queries using DB2 JDBC Type 4 Universal driver in java application, the following error is thrown

Code:
DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: ;;) + CURRENT TIMEZONE;END-OF-STATEMENT
The sql query is as below

Code:
delete from ice.right_column	 where rc_id = 'pm025491' and rc_launch_date = TIMESTAMP('2006-11-23-05.01.00') + CURRENT TIMEZONE;
The query was working fine with DB2 CLI Native driver, but on porting the application to JDBC Type 4 Universal driver, the above error is coming up.
The error is because of trailing semicolon, removing which removes the error.

But our application is such that modifying queries will involve a lengthy process (i.e the queries are generated by some other application), is there a way of configuring the Type 4 driver (specifying/despecifying statement delimiter...etc) so that it stops complaining !!!.

And if someone can throw some light(i.e any DB2 developers ??) as to the core reason why Type 4 driver is complaining, bearing in mind that the CLI driver has no issues with it.

Thanks in advance !!.
Reply With Quote
  #2 (permalink)  
Old 09-18-08, 10:49
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
The ';' is not part of the SQL statement. Just remove it.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 09-20-08, 08:54
rahulj rahulj is offline
Registered User
 
Join Date: Sep 2008
Posts: 2
Thanks stolze, but as I mentioned removing them will be very cumbersome in my case.....so am looking for alternatives. Don't you think an alternative solution should be there bearing in mind that the CLI driver had no issues with the trailing semicolon and that ; acts as statement delimiter in DB2
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On