Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 6 of 6

Thread: Unable to create Category or product in ML 9.2

  1. #1
    Nady is offline Junior Member
    Join Date
    Nov 2011
    Posts
    1

    Question Unable to create Category or product in ML 9.2

    This is a brand new installation and still in testing mode. When I try to create a new product, Category or distributer I am getting the following error:

    Invalid object name 'ObjectView'.
    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 'ObjectView'.

    Source Error:


    Line 410: connection.Open();
    Line 411:
    Line 412: IDataReader reader = DB.GetRS("dbo.aspdnsf_GetMappedObject @StoreId = {0}, @EntityType = {1}, @EntityID = {2}".FormatWith(this.StoreID, entityType.DBQuote(), id), connection);
    Line 413: while (reader.Read())
    Line 414: {


    Source File: c:\HostingSpaces\keynet\newfurniture4less.net\wwwr oot\App_Code\CachelessStore.cs Line: 412

    Stack Trace:


    [SqlException (0x80131904): Invalid object name 'ObjectView'.]
    System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception, Boolean breakConnection) +1953274
    System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +4849707
    System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) +194
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
    System.Data.SqlClient.SqlDataReader.ConsumeMetaDat a() +33
    System.Data.SqlClient.SqlDataReader.get_MetaData() +96
    System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
    System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
    System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
    System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
    System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior behavior, String method) +141
    System.Data.SqlClient.SqlCommand.ExecuteReader() +89
    AspDotNetStorefrontCore.DB.GetRS(String Sql, SqlConnection dbconn) +141
    AspDotNetStorefront.CachelessStore.GetMapping(Stri ng entityType, Int32 id) in c:\HostingSpaces\keynet\newfurniture4less.net\wwwr oot\App_Code\CachelessStore.cs:412
    AspDotNetStorefront.CachelessStore.IsMapped(String entityType, Int32 id) in c:\HostingSpaces\keynet\newfurniture4less.net\wwwr oot\App_Code\CachelessStore.cs:397
    AspDotNetStorefrontControls.EntityToStoreMapper.<D ataBind>b__0(CachelessStore store) in c:\HostingSpaces\keynet\newfurniture4less.net\wwwr oot\Doobi\Controls\EntityToStoreMapper.ascx.cs:45
    System.Linq.WhereSelectListIterator`2.MoveNext() +90
    System.Linq.Buffer`1..ctor(IEnumerable`1 source) +131
    System.Linq.Enumerable.ToArray(IEnumerable`1 source) +47
    AspDotNetStorefrontControls.EntityToStoreMapper.Da taBind() in c:\HostingSpaces\keynet\newfurniture4less.net\wwwr oot\Doobi\Controls\EntityToStoreMapper.ascx.cs:44
    AspDotNetStorefrontAdmin.entityEdit.Page_Load(Obje ct sender, EventArgs e) in c:\HostingSpaces\keynet\newfurniture4less.net\wwwr oot\Doobi\entityEdit.aspx.cs:106
    System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp, Object o, Object t, EventArgs e) +14
    System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object sender, EventArgs e) +35
    System.Web.UI.Control.OnLoad(EventArgs e) +99
    AspDotNetStorefrontAdmin.AdminPageBase.OnLoad(Even tArgs e) +47
    System.Web.UI.Control.LoadRecursive() +50
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.4216; ASP.NET Version:2.0.50727.4209

  2. #2
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    Did you check to see if you have an 'ObjectView' View in your DB? You probably have one, but it's named incorrectly - something like dbusername.ObjectView instead of dbo.ObjectView. That can happen sometimes in shared hosting environments. You'd need to work with your host to get that (and any other objects that aren't prefaced with dbo) renamed.

  3. #3
    ahsrescue is offline Member
    Join Date
    Feb 2008
    Posts
    35

    Default Reset Tables to dbo Schema.sql?

    Would the Reset Tables to dbo Schema.sql script work? ObjectView, is that a table? What is that? I'm having the same problem.
    Last edited by ahsrescue; 02-08-2012 at 01:19 PM.

  4. #4
    ahsrescue is offline Member
    Join Date
    Feb 2008
    Posts
    35

    Default Oh I see - its a view

    I didn't read you completely. So the schema got messed up on 3 of my views.

  5. #5
    ahsrescue is offline Member
    Join Date
    Feb 2008
    Posts
    35

    Default create database script

    Its NOT the fault of "some shared hosting environments", its the fault of aspdotnetstorefront's "Create AspDotNetStorefront Database.sql" script. In 3 of the create view scripts, there is no schema/owner specified... Which is inconsistent, because the rest of the views and everything else has the ownership specified as "dbo.[xxxxx]"

    it just says: "CREATE VIEW ObjectView"

    But, its supposed to say: "CREATE VIEW [dbo].[ObjectView]"

    This script is just fine if the default ownership for your sql user is "dbo".
    But for many of us on a shared hosting server, the default owner/schema is NOT "dbo"! This is a bad error in your create script. It causes many people to have to spend an extra day or two figuring this out and getting their host to fix it. Its a stumbling block and a bummer. I'm just gonna delete the views from sql management studio and re-run those create scripts correctly.
    Last edited by ahsrescue; 02-09-2012 at 07:37 AM.

  6. #6
    hogesoftware is offline Junior Member
    Join Date
    Jul 2009
    Posts
    5

    Default Thanks for the remedy

    Thanks for the remedy. I had this same problem but deleted the views and recreated with dbo. schema and all is well!!!