SunQuest
 
           Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old August 14th, 2003, 02:04 AM
kling kling is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 2 kling User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Urgent! Please help. Can't insert!

Hi,

I am running SQL2000 on W2k server. Everything was working fine untill sometime yesterday. All in a sudden, I was not able to insert into my database table. I can do select, and I can even run sp_columns on the table, but when I try to INSERT, I get the following error ...


Server: Msg 208, Level 16, State 3, Line 4
Invalid object name [tablename].

The insert statment should be working fine as they were run before the problem occurs! Has anyone ran into this before? Any input is appreciated!

Thanks!

Kevin

Reply With Quote
  #2  
Old August 14th, 2003, 02:08 AM
kling kling is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 2 kling User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
btw, I was using SQL Analyzer!

Reply With Quote
  #3  
Old September 8th, 2003, 05:52 PM
unatratnag unatratnag is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 312 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 6 sec
Reputation Power: 5
Send a message via AIM to unatratnag
you may be using query analyzer but someone else may have been using Enterprise manager in which case it's quite easy to alter the schema by accident. Double check the names of the columns to make sure they haven't been altered

also you mention stored procedures. If your stored procedure is selecting data from a table in a different DB you might also get this method with disconnected recordsets. In which case the remote portion of ActiveX Data Objects (ADO) (Msdaprst.dll) is inadvertently overwriting portions of the metadata contained in the recordset. When subsequently constructing the UPDATE statement, this metadata is not available and incorrect syntax is generated.

If you examine the trace logs, you'll see that the correct database.owner.tablename syntax was used while selecting the records, but only the tablename was used while constructing the UPDATE statement.

Because the Connection currently points to the database containing the stored procedure and the table does not exist in that database, "Invalid object name" errors will be returned.

Regards

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Urgent! Please help. Can't insert!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway