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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid object name when running stored procedure

Status
Not open for further replies.

cyberbiker

Programmer
Mar 16, 2001
431
US
I am just learning about and experimentung with stored procedures.

I keep receiving an "Invalid Object name 'Glass_Cutters'" error when I try to execute the stored procedure. The one stored procedure is simple:

CREATE PROCEDURE [sqCutterOpen] AS
Select * from [Glass_cutters]

The table is named Glass_cutters and I have even kept the case the same.

The select statement worked fine when I used it from vb so I do not think I have a permission or ownership issue although I really do not see what else it could be.

I have several other stored procedures that are identical )except for the table name) that give the same error.


I use the following to call the stored procedure where rs has been declared as a new ADODB.recordset

Set rs = connection.Execute("sqCutterOpen", , adCmdStoredProc).

It appears obvious that I am accessing the stored procedure or 'Glass_cutters' would not be returned.

Any ideas?

Thanks Terry (cyberbiker)
 
Fiqured it out. In my experiments I was connected to the database as <username> when I created the tables and as sa when I created the stored procedures. Since <username> was &quot;owner&quot; of the db and has full permissions, I did not stop to think that I would need to prefix the tables with <username>. to access the tables. OOPS.
It is a very good thing that I learn most from correcting mistakes. :) Terry (cyberbiker)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top