Update failed: Telerik.OpenAccess

4 posts, 0 answers
  1. richard
    richard avatar
    48 posts
    Member since:
    Dec 2010

    Posted 26 Aug 2013 Link to this post

    I have  an asp.net app that is getting the following error when trying to update the database. I dont have a field called 'updated' so to me it seems OpenAccess is passing something in to SQL Server that it doesn't like. Other tables being updated seem to work just fine. This is a small table with only 6 fields.

    CREATE TABLE [dbo].[Model](
    [id] [numeric](8, 0) IDENTITY(1,1) NOT NULL,
    [brandID] [numeric](8, 0) NULL,
    [dealerID] [numeric](8, 0) NULL,
    [name] [nvarchar](50) NULL,
    [status] [bit] NULL,
    [image] [nvarchar](max) NULL,
     CONSTRAINT [PK__Mode__3213E83F31F75A1E] PRIMARY KEY CLUSTERED 

    {"Update failed: Telerik.OpenAccess.RT.sql.SQLException: Invalid object name 'updated'. ---> System.Data.SqlClient.SqlException: Invalid object name 'updated'.\r\n   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)\r\n   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)\r\n   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()\r\n   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)\r\n   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()\r\n   at System.Data.SqlClient.SqlDataReader.get_MetaData()\r\n   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)\r\n   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)\r\n   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)\r\n   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)\r\n   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)\r\n   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)\r\n   at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)\r\n   at OpenAccessRuntime.CommandWrapper.ExecuteReader(CommandBehavior behavior)\r\n   at Telerik.OpenAccess.Runtime.Logging.LoggingDbCommand.ExecuteDbDataReader(CommandBehavior behavior)\r\n   at System.Data.Common.DbCommand.ExecuteReader()\r\n   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.CommandImp.ExecuteReader()\r\n   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeUpdate()\r\n   --- End of inner exception stack trace ---\r\n   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeUpdate()\r\n   at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeUpdate()\r\n   at OpenAccessRuntime.Relational.RelationalStorageManager.generateUpdates(OID oid, Int32 index, ClassMetaData cmd, PersistGraph graph, Int32[] fieldNos, Boolean haveNewObjects, CharBuf s)\nRow: GenericOID@37aa8967 BoatModel id=37\nUPDATE [BoatModel] SET [name]=? WHERE [id] = ? AND [name]=?\n(set event logging to all to see parameter values) Telerik.OpenAccess.RT.sql.SQLException: Invalid object name 'updated'. ---> System.Data.SqlClient.SqlException: Invalid object name 'updated'.\r\n   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)\r\n   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)\r\n   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()\r\n   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)\r\n   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()\r\n   at System.Data.SqlClient.SqlDataReader.get_MetaData()\r\n   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)\r\n   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)\r\n   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)\r\n   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)\r\n   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)\r\n   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)\r\n   at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)\r\n   at OpenAccessRuntime.CommandWrapper.ExecuteReader(CommandBehavior behavior)\r\n   at Telerik.OpenAccess.Runtime.Logging.LoggingDbCommand.ExecuteDbDataReader(CommandBehavior behavior)\r\n   at System.Data.Common.DbCommand.ExecuteReader()\r\n   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.CommandImp.ExecuteReader()\r\n   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeUpdate()\r\n   --- End of inner exception stack trace ---\r\n   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeUpdate()\r\n   at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeUpdate()\r\n   at OpenAccessRuntime.Relational.RelationalStorageManager.generateUpdates(OID oid, Int32 index, ClassMetaData cmd, PersistGraph graph, Int32[] fieldNos, Boolean haveNewObjects, CharBuf s)"}
  2. richard
    richard avatar
    48 posts
    Member since:
    Dec 2010

    Posted 27 Aug 2013 Link to this post

    ok, so still no resolution.

    I rewrote a lot of code to get around this issue.....BUT it is still an issue that needs to be addressed.

    Richard
  3. DevCraft banner
  4. Ady
    Admin
    Ady avatar
    589 posts

    Posted 29 Aug 2013 Link to this post

    Hi Richard,

     Based on the call stack it seems that you are trying to save changes made to an object. OpenAccess is then executing an UPDATE statement which is causing the exception.
    Although what is confusing is the error message - The UPDATE sql is nowhere referencing an object called 'update'
    What are the steps to reproduce this? What is the code that causing this exception? If possible it would be nice to have a sample application that reproduce the error.

    Regards,
    Ady
    Telerik
    OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvements shipped with this release.
  5. richard
    richard avatar
    48 posts
    Member since:
    Dec 2010

    Posted 29 Aug 2013 Link to this post

    Ady,

    It seems that an update trigger was causing the issue. I simply deleted the trigger and will have to address how to handle the triggers function later.

    Thanks,
    Richard
Back to Top