Invalid object name accessing SQL

J

Jerry Nelson

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. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Invalid object
name 'WGA_Update'.

Source Error:


Line 20: objConn.Open();
Line 21:
Line 22: objRdr = objCmd.ExecuteReader();
Line 23: ddlLast.DataSource = objRdr;
Line 24: ddlLast.DataValueField = "WwgaID";


Source File: c:\inetpub\wwwroot\wga\wgaUpdate3.aspx Line: 22

Stack Trace:


[SqlException: Invalid object name 'WGA_Update'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742
System.Data.SqlClient.SqlCommand.ExecuteReader() +42
ASP.wgaUpdate3_aspx.BindData() in
c:\inetpub\wwwroot\wga\wgaUpdate3.aspx:22
ASP.wgaUpdate3_aspx.Page_Load() in
c:\inetpub\wwwroot\wga\wgaUpdate3.aspx:13
System.Web.Util.ArglessEventHandlerDelegateProxy.Callback(Object
sender, EventArgs e) +10
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750

Any help would be appreciated.
 
J

Jerry

I figured out the problem, I just needed to change the ownership of
WGA_Update to dbo.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,120
Latest member
ShelaWalli
Top