-->
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: Varchar column
PostPosted: Fri Sep 19, 2003 1:21 pm 
Newbie

Joined: Fri Sep 19, 2003 1:05 pm
Posts: 2
Hi all,

I'm using Hibernate 2.0.1 with MS SQL Server. I have a column defined in my mapping file with length=8000. Hibernate generates this in the database as a varchar(8000) column. The problem is that I can only insert 4000 characters into this column.

I'm guessing this is because of unicode, but if that were so, why doesn't Hibernate generate the column as nvarchar? Oddly enough, the temporary stored procedure that is generated to access the table appears to use nvarchar for the parameter data type, so there must be a conversion happening in the SP, probably an implicit one.

Is there any way to get 8000 characters into a MSSQL varchar column with Hibernate?

Thanks,

Morley


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 19, 2003 4:12 pm 
Newbie

Joined: Fri Sep 19, 2003 1:05 pm
Posts: 2
Never mind this post, I figured it out. It turns out that the driver I've been using (jTDS) was doing something stupid to cause the problem. I tweaked and recompiled it and it now works. I also tried the MS driver with the connection property SendStringParametersAsUnicode=false and that worked as well.

Morley


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.