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 > DATA ERROR [IBM][CLI Driver][DB2/LINUX] SQL0104N

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-14-05, 05:44
just_to_know just_to_know is offline
Registered User
 
Join Date: Feb 2005
Posts: 2
Question DATA ERROR [IBM][CLI Driver][DB2/LINUX] SQL0104N

DATA ERROR [IBM][CLI Driver][DB2/LINUX] SQL0104N An unexpected token "?" was found following "DB2INST1.scustomer(?". Expected tokens may include: "+". SQLSTATE=42601

Hi

I am using a stored procedure in a java code which on execution is giving my this exception. The procedure call is shown below :

cstmt=con.prepareCall("call db2inst1.scustomer(? ? ?)");
cstmt.setString(1,phoneID);
cstmt.setString(2,firstName);
cstmt.setString(3,lastName);
result = cstmt.executeQuery();

I have checked and the procedure accepts three parameters, and it runs fine if i call it from db2 prompt. Can some one suggets what is the problem behind the exception ?
As i am not getting any Tomcat messages so i think this error is not related to any tomcat jar or any other thing

Any suggestion is welcome

regards
Just to Know
Reply With Quote
  #2 (permalink)  
Old 02-14-05, 06:50
ritz ritz is offline
Registered User
 
Join Date: Jan 2005
Posts: 35
Smile

Hi,

You have missed out on the commas to separate the parameters in the procedure call. Make the change and it should work fine.

Regards,
Ritz
Reply With Quote
  #3 (permalink)  
Old 02-14-05, 07:56
just_to_know just_to_know is offline
Registered User
 
Join Date: Feb 2005
Posts: 2
Thanks ritz

Hi Ritz

Thanks putting commas soled the problem.

regards
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