|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
btw, I was using SQL Analyzer!
|
|
#3
|
|||
|
|||
|
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 |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Urgent! Please help. Can't insert! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|