Error with reverse mapped BLOB SUB_TYPE 1 field from Firebird 2.1 table

4 posts, 1 answers
  1. Sigurd
    Sigurd avatar
    5 posts
    Member since:
    Dec 2008

    Posted 21 May 2009 Link to this post

    Hi,

    After reverse mapping existing Firebird 2.1 database, trying to insert new record into the table with text BLOB field via ObjectProvider.SaveAll() method I've got the following exception:

    Telerik.OpenAccess.Exceptions.DataStoreException was unhandled
      Message="Insert of '60775892-1' failed: Telerik.OpenAccess.RT.sql.SQLException: Dynamic SQL Error\r\nSQL error code = -303\r\nfeature is not supported\r\nBLOB and array data types are not supported for move operation\r\n   в Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.execute()\r\n   в OpenAccessRuntime.Relational.conn.PooledPreparedStatement.execute()\r\n   в OpenAccessRuntime.Relational.RelationalStorageManager.generateInserts(NewObjectOID oid, Int32 index, ClassMetaData cmd, PersistGraph graph, Int32[] fieldNos, CharBuf s, Object[] oidData, IntArray toUpdateIndexes)\nINSERT INTO \"ANALYSISMETHODS\" (\"DESCRIPTION\", \"METHODNAME\", \"NR\") VALUES (?, ?, ?)\n(set event logging to all to see parameter values) Telerik.OpenAccess.RT.sql.SQLException: Dynamic SQL Error\r\nSQL error code = -303\r\nfeature is not supported\r\nBLOB and array data types are not supported for move operation\r\n   в Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.execute()\r\n   в OpenAccessRuntime.Relational.conn.PooledPreparedStatement.execute()\r\n   в OpenAccessRuntime.Relational.RelationalStorageManager.generateInserts(NewObjectOID oid, Int32 index, ClassMetaData cmd, PersistGraph graph, Int32[] fieldNos, CharBuf s, Object[] oidData, IntArray toUpdateIndexes)"
      Source="Telerik.OpenAccess"
      CanRetry=false
      StackTrace:
           в Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e)
           в Telerik.OpenAccess.RT.ExceptionWrapper.Throw()
           в OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.handleException(Exception x)
           в OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.internalCommit(Boolean phase)
           в OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.commit()
           в OpenAccessRuntime.DataObjects.UnsynchronizedPMProxy.commit()
           в Telerik.OpenAccess.RT.TransactionImpl.Commit()
           в Telerik.OpenAccess.ObjectProvider.SaveAll()
           в WindowsFormsApplication7.DataForm1.buttonSave_Click(Object sender, EventArgs e) в C:\Documents and Settings\Admin\Мои документы\Visual Studio 2008\Projects\WindowsFormsApplication7\WindowsFormsApplication7\DataForm1.cs:строка 32
           в System.Windows.Forms.Control.OnClick(EventArgs e)
           в System.Windows.Forms.Button.OnClick(EventArgs e)
           в System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
           в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
           в System.Windows.Forms.Control.WndProc(Message& m)
           в System.Windows.Forms.ButtonBase.WndProc(Message& m)
           в System.Windows.Forms.Button.WndProc(Message& m)
           в System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
           в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
           в System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
           в System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
           в System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
           в System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
           в System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
           в System.Windows.Forms.Application.Run(Form mainForm)
           в WindowsFormsApplication7.Program.Main() в C:\Documents and Settings\Admin\Мои документы\Visual Studio 2008\Projects\WindowsFormsApplication7\WindowsFormsApplication7\Program.cs:строка 18
           в System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
           в System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           в Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           в System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           в System.Threading.ThreadHelper.ThreadStart()
      InnerException: Telerik.OpenAccess.RT.sql.SQLException
           Message="Dynamic SQL Error\r\nSQL error code = -303\r\nfeature is not supported\r\nBLOB and array data types are not supported for move operation"
           Source="Telerik.OpenAccess.Adonet2"
           Description="SQLState=;Dynamic SQL Error\r\nSQL error code = -303\r\nfeature is not supported\r\nBLOB and array data types are not supported for move operation"
           ErrorCode=335544569
           Number=335544569
           StackTrace:
                в Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.execute()
                в OpenAccessRuntime.Relational.conn.PooledPreparedStatement.execute()
                в OpenAccessRuntime.Relational.RelationalStorageManager.generateInserts(NewObjectOID oid, Int32 index, ClassMetaData cmd, PersistGraph graph, Int32[] fieldNos, CharBuf s, Object[] oidData, IntArray toUpdateIndexes)
           InnerException:

    In case of forward mapping of string property to LONGVARCHAR(BLOB SUB_TYPE 1) field all working correctly!
  2. Answer
    Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 25 May 2009 Link to this post

    Hi Sigurd,
    I am able to reproduce your problem. I am not able to send you a workaround so far because for me in the forward mapped scenario it is also not working.

    Can you double check the forward case? The string should contain something.

    Kind regards,
    Jan Blessenohl
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. Sigurd
    Sigurd avatar
    5 posts
    Member since:
    Dec 2008

    Posted 25 May 2009 Link to this post

    Many thanks!!!
    All are working excellent in case of reverse mapping when I set db-length to -2. In forward mapping I've detected the same problem as well and after the setting of db-type also all works correctly, but I need to switch off the update of database because the following error had appeared
    Error    35    OpenAccess Error: Telerik.OpenAccess: Updating SQL schema failed. Telerik.OpenAccess.OpenAccessException: SQL exception on 'CREATE TABLE "TEMP_HUMAN" ( "human_id" INTEGER NOT NULL,  "descr" BLOB SUB_TYPE 1(-2),  "namee" varchar(190),  "voa_version" SMALLINT NOT NULL  )' : Dynamic SQL Error
    SQL error code = -104
    Token unknown - line 1, char 82
    Unfortunately, OA creates the wrong syntax in this case.
      
  5. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 26 May 2009 Link to this post

    Hi Sigurd,
    This is only a workaround, it is not perfect but working. If you use forward the onyl way is to have two mapping trees, one for buildtime and one for runtime. We will try to fix this in the next release.

    Greetings,
    Jan Blessenohl
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top