Hi all
I am porting asp.net application to mono on the linux server (db server is on windows so far).
The problem I cannot pass is the "StringClob" data type. Everything works fine when NHibernate is running on MS .NET , in the generated sql "ntext" data type is being used.
On the Mono framework, nvarchar(1073741823) instead of ntext data type is used in the generated sql throwing the exception below.
Both cases uses the exact database on the same server. Both of them uses exactly the same Nhibernate.dll (and referenced dlls). What can be the cause of different behavior? Please help, I need to finish this task until this wednesday.
NHibernate version:1.0.1
Full stack trace of any exception that occurs:
Code:
NHibernate.ADOException: could not update: [app.Oferta#91] ---> System.Data.SqlClient.SqlException: The size (1073741823) given to the type 'nvarchar' exceeds the maximum allowed for any data type (8000).
in <0x000a0> System.Data.SqlClient.SqlConnection:ErrorHandler (System.Object sender, Mono.Data.Tds.Protocol.TdsInternalErrorMessageEventArgs e)
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_TdsInternalErrorMessageEventArgs (object,Mono.Data.Tds.Protocol.TdsInternalErrorMessageEventArgs)
in <0x0001d> Mono.Data.Tds.Protocol.Tds:OnTdsErrorMessage (Mono.Data.Tds.Protocol.TdsInternalErrorMessageEventArgs e)
in <0x001aa> Mono.Data.Tds.Protocol.Tds:ProcessMessage (TdsPacketSubType subType)
in <0x0010e> Mono.Data.Tds.Protocol.Tds:ProcessSubPacket ()
in <0x00045> Mono.Data.Tds.Protocol.Tds:NextResult ()
in (wrapper remoting-invoke-with-check) Mono.Data.Tds.Protocol.Tds:NextResult ()
in <0x00010> Mono.Data.Tds.Protocol.Tds:SkipToEnd ()
in (wrapper remoting-invoke-with-check) Mono.Data.Tds.Protocol.Tds:SkipToEnd ()
in <0x00074> Mono.Data.Tds.Protocol.Tds:ExecuteQuery (System.String sql, Int32 timeout, Boolean wantResults)
in <0x0006e> Mono.Data.Tds.Protocol.Tds70:Execute (System.String commandText, Mono.Data.Tds.TdsMetaParameterCollection parameters, Int32 timeout, Boolean wantResults)
in <0x002fa> System.Data.SqlClient.SqlCommand:Execute (CommandBehavior behavior, Boolean wantResults)
in <0x00048> System.Data.SqlClient.SqlCommand:ExecuteNonQuery ()
in <0x0003a> NHibernate.Impl.BatcherImpl:ExecuteNonQuery (IDbCommand cmd)
in <0x00025> NHibernate.Impl.NonBatchingBatcher:AddToBatch (Int32 expectedRowCount)
in <0x003a0> NHibernate.Persister.EntityPersister:Update (System.Object id, System.Object[] fields, System.Object[] oldFields, System.Boolean[] includeProperty, System.Object oldVersion, System.Object obj, NHibernate.SqlCommand.SqlString sqlUpdateString, ISessionImplementor session)--- End of inner exception stack trace ---
in <0x00510> NHibernate.Persister.EntityPersister:Update (System.Object id, System.Object[] fields, System.Object[] oldFields, System.Boolean[] includeProperty, System.Object oldVersion, System.Object obj, NHibernate.SqlCommand.SqlString sqlUpdateString, ISessionImplementor session)
in <0x0007a> NHibernate.Persister.EntityPersister:Update (System.Object id, System.Object[] fields, System.Int32[] dirtyFields, System.Object[] oldFields, System.Object oldVersion, System.Object obj, ISessionImplementor session)
in <0x000e6> NHibernate.Impl.ScheduledUpdate:Execute ()
in <0x000a6> NHibernate.Impl.SessionImpl:Execute (IExecutable executable)
in <0x000db> NHibernate.Impl.SessionImpl:ExecuteAll (IList list)
in <0x00064> NHibernate.Impl.SessionImpl:Execute ()
Name and version of the database you are using:Ms Sql Server 2005