Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC Stored Procedure Call Failure

Status
Not open for further replies.

pthalacker

Programmer
Aug 30, 2004
150
I am converting SPT code to Stored Procedures and using an ODBC connection to call them.

The first stored procedure runs just fine in the Query Analyzer, but returns an error string 'Could not find stored procedure <proc name>' The error code is 37000 Syntax error or access violation.

Since the SP runs just fine in the Query Analyzer, I suspect some king of access problem. I can run "Select * from sysobjects" successfully using the same ODBC connection and calling protocol. I am logged in as 'sa' so I am truly confused as to what the problem might be.

Any suggestions?

pamela
 
Run this in QA:
Code:
sp_MSForEachDB 'SELECT ''?'' AS DBase WHERE object_id(''?..GetAcctBalance'') IS NOT NULL
'
and you will get the list of the DataBases where that SP is defined

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
MVP VFP
 
The first stored procedure runs just fine in the Query Analyzer, but returns an error string 'Could not find stored procedure <proc name>' The error code is 37000 Syntax error or access violation.

Obviously it DOESN'T run just fine since you get an error message.

Which version of SQL Server are you using and what level of service pack?

Check your MDAC version, search the Microsoft website for Component Checker. I believe MDAC 2.8 is the latest.

Other than that, it's hard for us to tell what the problem could be since we don't have your scripts and it could be a syntax error.

-SQLBill

Posting advice: FAQ481-4875
 
Thank you. The ODBC client was connected to the wrong server.

pamela
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top