redho home | products | services

Programming Forums


Community for Java, PHP, Perl C, ASP and Python programmers
Friday 14 December 2018 00:36

Ask your IT question here

'invalid object name'?



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Programming Forums -> ASP in depth
View previous topic :: View next topic  
Author Message
Zaraza
Guest Programmer




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




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
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Programming Forums -> ASP in depth


Dubai Forums - Expat Help | Vegan Forum | Java Programming | 3d Design Resources | 3d Forum | 3D Jobs | 3D Textures | Paris Forum | Europe Forum
Dubai Classifieds | Dubai Property | Jobs in Dubai | Free London Classifieds | Jobs in London UK

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

© 2018 RedHo