473,396 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Invalid Object Name error. What is this referring to?

I'm trying to delete a record in a table:

Dim strConnect As String =
System.Configuration.ConfigurationSettings.AppSett ings("myConnectionString")
Dim strChk = "DELETE FROM we_admin_users WHERE UserID='" & myUserID & "'"
Dim objConnect As New System.Data.OleDb.OleDbConnection(strConnect)
objConnect.Open()
Dim objCommand As New System.Data.OleDb.OleDbCommand(strChk, objConnect)
objCommand.ExecuteNonQuery()

objConnect.Close()
objCommand.Dispose()

But when I run this, I get this error:

" Invalid object name 'we_admin_users' "

I can run this same function against a different table, and it executes
fine. I can also take the query from above and use it directly in Enterprise
Manager, and it executes fine. Both tables have the same permissions.

So, I'm stumped as to what it things the problem is. What else should I look
at?

-Darrel
Dec 15 '05 #1
2 2039
the error means the table we_admin_users in the delete does not exists.
check that the connect string references the correct server and database.

-- bruce (sqlwork.com)


"darrel" <no*****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I'm trying to delete a record in a table:

Dim strConnect As String =
System.Configuration.ConfigurationSettings.AppSett ings("myConnectionString")
Dim strChk = "DELETE FROM we_admin_users WHERE UserID='" & myUserID & "'"
Dim objConnect As New System.Data.OleDb.OleDbConnection(strConnect)
objConnect.Open()
Dim objCommand As New System.Data.OleDb.OleDbCommand(strChk, objConnect)
objCommand.ExecuteNonQuery()

objConnect.Close()
objCommand.Dispose()

But when I run this, I get this error:

" Invalid object name 'we_admin_users' "

I can run this same function against a different table, and it executes
fine. I can also take the query from above and use it directly in
Enterprise Manager, and it executes fine. Both tables have the same
permissions.

So, I'm stumped as to what it things the problem is. What else should I
look at?

-Darrel

Dec 15 '05 #2
the error means the table we_admin_users in the delete does not exists.
check that the connect string references the correct server and database.


It does exist. I can put the exact same query into Enterprise Manager and it
runs fine.

It also uses the same connection string as the other function I'm calling,
which deletes from another table, which also works fine.

-Darrel
Dec 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Glenn A. Harlan | last post by:
Why am I receiving the below error when calling - Path.GetTempFileName() The directory name is invalid. Description: An unhandled exception occurred during the execution of the current web...
12
by: Charles A. Lackman | last post by:
Hello, I have made a web site that streams music using mms. The service works great but I have noticed that when the song or song location has an apostaphie in it the server (or something) cuts...
3
by: John Howard | last post by:
Making the following call to a local MSAccess database works fine: Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs) Dim intRows As Integer Dim strSQL As String Dim ds As New...
2
by: Jerry Nelson | last post by:
I get the following error: WGA_Update is a view not a Table Invalid object name 'WGA_Update'. Description: An unhandled exception occurred during the execution of the current web request....
21
by: John Howard | last post by:
Making the following call to a local MSAccess database works fine: Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs) Dim intRows As Integer Dim strSQL As String Dim ds As New...
1
by: Java Guy | last post by:
I'm trying to view a web page. IE tells me there are (Java?) errors on the page. Here they are: Line: 15 Char: 7 Error: Wrong number of arguments or invalid propert assignment Code: 0 URL:...
7
by: The|Godfather | last post by:
Hi everybody, I read Scotte Meyer's "Effective C++" book twice and I know that he mentioned something specific about constructors and destructors that was related to the following...
2
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
1
by: samarthkumar84 | last post by:
Hi I had used following code for sending e-mail but facing this problem. I want to send this e-mail in ASP.NET using VB.NET code. I am attaching both code an output. CODE Imports...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.