Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark ""Could not find stored procedure" Error" Watch ""Could not find stored procedure" Error" New topic
Author

"Could not find stored procedure" Error

Johnathon Smith
Greenhorn

Joined: Jul 28, 2009
Posts: 3
I have a java application that access data from a SQL Server 2005 database. All of the sudden I'm getting a "Could not find stored procedure" exception when trying to run any stored procedure from within the application. The code hasn't changed. The database hasn't changed. This code used to work but now I keep getting this error. I've already verified that I can log into the database server and execute the stored procedure from within SQL Server Management Studio using the same credentials that the web app uses. So it doesn't appear to be a permissions issue. Here are some of the details from my code...

[b]connection string[/b]
jdbc:microsoft:sqlserver://130.175.238.229:4078;DatabaseName=Equity;SelectMethod=cursor

[b]jdbc driver[/b]
com.microsoft.jdbc.sqlserver.SQLServerDriver

[b]stack trace[/b]
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Could not find stored procedure 'uspCompanyList'.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)


I'm at a loss as to how this code could just stop working. Any ideas?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: "Could not find stored procedure" Error
 
Similar Threads
Getting Exception as Could not find stored procedure 'sp_getNextMainGroup'
Getting SQL Exception although stored procedure is correct!!!
Help..when I called stored procedure in java codes. some errors message.
Help..when I called stored procedure in java codes. some errors message.
retrieve data from SQL Server 2005 using Microsoft's JDBC driver