468,107 Members | 1,253 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,107 developers. It's quick & easy.

Could not find stored procedure

I have an Access 2000 database connected to a SQL Server and am trying
to execute my first stored procedure. I created the stored procedure
and verified that it works, but when I try to execute it from Access:

cnn.Execute("sp_IPT")

it says: 'Could not find stored procedure 'sp_IPT'

Any ideas?

Norman B. Scheinin
F-22 Applications Development
M/S 4E-09
(206) 655-7236
no***************@boeing.com
Jul 20 '05 #1
1 20581
Norman Scheinin (no***************@boeing.com) writes:
I have an Access 2000 database connected to a SQL Server and am trying
to execute my first stored procedure. I created the stored procedure
and verified that it works, but when I try to execute it from Access:

cnn.Execute("sp_IPT")

it says: 'Could not find stored procedure 'sp_IPT'

Any ideas?


I would guess that you have not specified which database to work in.
You define this with "Initial Catalog" in the connection string. You
can also have a default database set for your SQL login. You can also
specify a three-part name when you invoke the procedure:

cnn.Execute("yourdb..sp_IPT")

I would also like to take the occassion to discourage you from using
sp_ as the first letters in the names of your stored procedures. This
prefix is reserved for system procedures, and SQL Server first looks
in the master database for these. It then looks in your current database,
so the prefix is not the cause for your problem.
--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by rcamarda | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.