-->
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.  [ 5 posts ] 
Author Message
 Post subject: Hibernate-SQLSERVER2000-CLOB
PostPosted: Thu Apr 29, 2004 12:03 pm 
Newbie

Joined: Thu Apr 15, 2004 12:00 pm
Posts: 13
we are using SQLServer2000 and we need to store a very large character stream(probably more than 10000 characters) in the db. I think we can use clob to represnt this. But looks like SQLServer doesn't support CLOB. Any suggestions??? I appreciate ur help.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 29, 2004 12:11 pm 
Newbie

Joined: Thu Apr 15, 2004 12:00 pm
Posts: 13
I think text datatype can store upto 2GB information. But how to configure it in hibernate. I mean how to insert/update/retrieve/delete.

I appreciate your help.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 29, 2004 3:07 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
You could read the documentation, "Basic Value Types".

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 29, 2004 4:11 pm 
Newbie

Joined: Thu Apr 15, 2004 12:00 pm
Posts: 13
Per documentation for long java strings we can use hibernate datatype "text", which internally maps to CLOB/TEXT. But my quetsion is in java Bean which data type I have to use? is it java.lang.String? I read some where that java string has maximum limit? I am not sure whether it's true or not.

I appreciate your help.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 29, 2004 4:15 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
You can use a String mapped as a text type, if it is okay for you to read the whole text field into memory uppon loading. Otherwise use a java.sql.Clob mapped with it as type.


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