redho home | products | services
Web Design Forums

Web Design Forums  


Web Hosting, Web Design, Software and Web Development Forums  
 FAQFAQ   MemberlistArchive  Log inLog in   RegisterRegister 
         

'invalid object name'?



 
Post new topic   Reply to topic    Web Design Forums -> ASP in depth
View previous topic :: View next topic  
Author Message
Zaraza
Guest




Why do I get 'object could not be found' or 'invalid object name'?
  Reply with quote


Steven
Guest




You may have seen one of these errors, even though you think the object does, in fact, exist:

Code:
Server: Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure '<objectname>'.
 
-- or
 
Server: Msg 208, Level 16, State 1, Line 1
Invalid object name '<objectname>'.


This can can happen in SQL Server, and can be due to a number of reasons. For example:

* the user you are connecting as does not have SELECT, UPDATE, INSERT, DELETE, EXEC permissions on the object;
* you aren't logging in / connecting as the user you expect;
* you are referencing the object without an owner name prefix (or with the wrong owner name);
* you are connected to the wrong database;
* you are, in fact, spelling the object's name incorrectly.

To avoid this problem, make sure you have a cohesive strategy for object ownership and access. Name all tables and stored procedures with the dbo prefix, and use the prefix when calling the procedure. (This prevents the parser from search for you.objectname instead of going straight to dbo.objectname.)
  Reply with quote
Page 1 of 1
Post new topic   Reply to topic    Web Design Forums -> ASP in depth


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group