-->
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.  [ 2 posts ] 
Author Message
 Post subject: Ansistring type length limit
PostPosted: Wed Mar 29, 2006 6:03 am 
Newbie

Joined: Tue Feb 21, 2006 6:46 am
Posts: 7
I have a table with column type nvarchar(6144) - but when I've created mapping for it - I've an exception:

Code:
System.Data.SqlClient.SqlException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 3 ("@p0"): Data type 0xE7 has an invalid data length or metadata length..

I've made some tests and now I see that the limit of string length equals to 4000 chars....Why?? And how to solve this?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 29, 2006 10:19 am 
Regular
Regular

Joined: Mon Jul 18, 2005 4:10 am
Posts: 92
Location: Poland
This is a Sql Server limitation - maxmimum row size is 8000 bytes , that gives (theoretically) maximum nvarchar length is 4000 characters (2 bytes/unicode character)

For bigger strings use ntext SqlType and StringClob NHibernate type, the only problem with this is limited "select distinct" capability

_________________
michal


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.