-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Mono and StringClob problem
PostPosted: Sun Jun 18, 2006 2:08 pm 
Regular
Regular

Joined: Mon Jul 18, 2005 4:10 am
Posts: 92
Location: Poland
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

_________________
michal


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 19, 2006 3:09 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Looks like the problem is Mono's System.Data.SqlClient implementation.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 19, 2006 10:07 am 
Regular
Regular

Joined: Mon Jul 18, 2005 4:10 am
Posts: 92
Location: Poland
Hi
Thanks for the info, the target database is Firebird, so if it really is a bug (feature?) of System.Data.SqlClient , I will leave it for a while until the database is ported, and see how it works with Firebird provider.

_________________
michal


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.