• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting SQL Exception although stored procedure is correct!!!

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using SQL Server 2000 database and i have some stored procedures to retrieve the data. I am using JDBC driver for SQL Server 2000. After making some changes to one of the stored procedures i am getting SQLException although the query analyzer shows correct output for that stored procedure:-(

this is the exception i am getting:

INFO [STDOUT] SQLException in STT_Beans.STT_EntityBeans.SearchListEntity.loadTeamMembersRequests(): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Incorrect syntax near the keyword 'in'.

ERROR [STDERR] java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Incorrect syntax near the keyword 'in'.

ERROR [STDERR] at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)

ERROR [STDERR] at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)

ERROR [STDERR] at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
ERROR [STDERR] at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
ERROR [STDERR] at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vinayachandra,
Query analyzer is often more forgiving than the actual query compiler. Probably because query analyzer doesn't have to execute an actual query.

Please post the snippet of the stored proc that is causing the error.
 
Vinayachandra Acharya
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi thanks for the reply...

but the problem was in sending the parameter... a where clause was sent as the i/p parameter to the stored proc.... but it was not handled properly inside the stored proc...

now problem is resolved :-)
 
Hold that thought. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic