-->
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: retrieving fixed length character data using sqlquery in Hib
PostPosted: Sat May 23, 2009 5:34 am 
Newbie

Joined: Wed Apr 01, 2009 3:00 am
Posts: 4
How to retrieve fixed length character data (for example char(5) ) from database using hibernate SQLQuery?

example:

Object obj=session.createSQLQuery("select col1 from table1 where
col2='12345'").uniqueObject();

Note: datatype of column 'col1' is char(5)

In result iam getting only the first character, the rest of the characters are gone.......need help in retrieving the whole data


Top
 Profile  
 
 Post subject: Re: retrieving fixed length character data using sqlquery in Hib
PostPosted: Mon May 25, 2009 1:20 am 
Newbie

Joined: Wed Apr 01, 2009 3:00 am
Posts: 4
please let me know if i did any mistake in the coding..........also let me know if it is possible or not
thanks


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.