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 'frontpagedata'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException: Invalid object name 'frontpagedata'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
TBZOnline.Components.Database.GetDataReadFromQry(String strQry) in c:\inetpub\wwwroot\DotNetCSharp\shaze_2\Components\Database.cs:311
TBZOnline.Components.frontpageData.GetFrontPageData() in c:\inetpub\wwwroot\DotNetCSharp\shaze_2\Components\Product.cs:525
tbzOnline.Default.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\DotNetCSharp\shaze_2\Default.aspx.cs:85
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
Version Information: Microsoft .NET Framework Version:1.1.4322.2379; ASP.NET Version:1.1.4322.2379
I am having similiar problems, when I try to check out my pages that have DB in them I get this:
Invalid object name 'Brands'.
Exception Details:
System.Data.SqlClient.SqlException: Invalid object name 'Brands'.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
ect. on the stack trace. Now Brands is the name of my table and it is supposed to display my products. Not sure why this isn't working. It works fine in my local host.
I would like to try your method, but I am not fully understand "ALTER SCHEMA dbo TRANSFER oldSchema.TableName", do you mind explaining more detail or any example?
I was suffer this error when I change my local SQL database to Server database and like you said the Username and password is different.
My error as below:
Server Error in '/' Application.
Invalid object name '訂單'.
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 '訂單'.
Source Error:
Line 95: SqlDataSource_Ordres.InsertParameters("訂購總金額").DefaultValue = LabelTextTotal.Text
Line 96: SqlDataSource_Ordres.InsertParameters("會員帳號").DefaultValue = LabelLoginName.Text
Line 97: SqlDataSource_Ordres.Insert()
Line 98:
Line 99: Dim TempStrArray1 As String()
The easiest way to correct this without messing with your code (ie, glueing owner names in your SQL code, which you shouldn't do in the first place), is to set appropriate permissions either at the database, schema or table levels. For example, create
a role within the given database, and assign the role the permission to access the named schema. The draw-back is that you'll have to assign each user to this role, or if you're on the lazy size (and I don't recommend this in a production environment), just
grant the permissions to the schema/tables to the 'guest' role.
Either way, you then don't have to be dependant on owner prefixes in your code, which can be a pain when things change on the back-end.
iperez_geniu...
Member
43 Points
212 Posts
Re: DB error: Invalid object name 'dbo.Events'
May 09, 2007 07:40 AM|LINK
not working for me...
when i replaced all the dbo. i foujnd they were all located in the xsd sheet.
I didn't find them anywhere else expect in the stored procedures...which after i changed the procedure it wouldn't let me save...
Does anyone have a solution for me?
Ilan
web Developer | Designer
pooja.indulk...
Member
2 Points
1 Post
System.Data.SqlClient.SqlException: Invalid object name 'frontpagedata'
Jun 08, 2007 01:41 PM|LINK
Server Error in '/' Application.
Invalid object name 'frontpagedata'.
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 'frontpagedata'.
Source Error:
Stack Trace:
Version Information: Microsoft .NET Framework Version:1.1.4322.2379; ASP.NET Version:1.1.4322.2379
rogriall79
Member
13 Points
18 Posts
Re: DB error: Invalid object name 'dbo.Events'
May 01, 2009 05:01 AM|LINK
I am having similiar problems, when I try to check out my pages that have DB in them I get this:
Invalid object name 'Brands'.
Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'Brands'.
Source Error:
ect. on the stack trace. Now Brands is the name of my table and it is supposed to display my products. Not sure why this isn't working. It works fine in my local host.
Any help would be great.
Thanks
Rich
RajibRoy
Member
29 Points
46 Posts
Re: DB error: Invalid object name 'dbo.Events'
Oct 03, 2009 03:19 PM|LINK
Hi,
This problem happen specially when you are restoring databse to another server and if you have changed the databse username.
To solve this problem the best way is to change all SCHEMA to dbo.
To change SCHEMA execute following code through your MSSQL Enterpeise manager
Chief Developer
Web Planner
Dubai, U.A.E
http://blogymate.com/blog/rajib
DanyWang
Member
5 Points
4 Posts
Re: DB error: Invalid object name 'dbo.Events'
Aug 03, 2010 03:42 PM|LINK
Hi, Expert,
I would like to try your method, but I am not fully understand "ALTER SCHEMA dbo TRANSFER oldSchema.TableName", do you mind explaining more detail or any example?
I was suffer this error when I change my local SQL database to Server database and like you said the Username and password is different.
My error as below:
Server Error in '/' Application.
Invalid object name '訂單'.
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 '訂單'.
Source Error:
Source File: D:\hshome\c300971\poofun.com\CheckOut.aspx.vb Line: 97
Stack Trace:
ScottV.
Member
50 Points
15 Posts
Re: DB error: Invalid object name 'dbo.Events'
Aug 25, 2010 07:02 AM|LINK
The easiest way to correct this without messing with your code (ie, glueing owner names in your SQL code, which you shouldn't do in the first place), is to set appropriate permissions either at the database, schema or table levels. For example, create a role within the given database, and assign the role the permission to access the named schema. The draw-back is that you'll have to assign each user to this role, or if you're on the lazy size (and I don't recommend this in a production environment), just grant the permissions to the schema/tables to the 'guest' role.
Either way, you then don't have to be dependant on owner prefixes in your code, which can be a pain when things change on the back-end.
Regards,
Scott
security sql server error coding