-->
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.  [ 1 post ] 
Author Message
 Post subject: Trailing Space in MS SQL Server nvarchar/varchar type
PostPosted: Thu Dec 18, 2008 12:30 am 
Newbie

Joined: Thu Dec 18, 2008 12:07 am
Posts: 1
Hi all,

I have a NetBean projects using Hibernate, when using Oracle before, everything works fine.

Now I have to test to save data in MSSQL Server, I found that when the data type is nvarchar or varchar, say 20 or 50 values, trailing space will be saved if the data value is 25 (i.e. 25 spaces), or 36 (i.e. 14 spaces).

I check the String variables before persist, and found that the values is ok, so I am sure that there must be some mapping config which I have to tune, but I don't have any idea.

Any one have suggestion? Thx.


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

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.