-->
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: How to map SQL Server Text datatype in Hibernate?
PostPosted: Thu Mar 23, 2006 2:13 am 
Beginner
Beginner

Joined: Tue Jun 21, 2005 1:45 pm
Posts: 38
EndorsementInstructions is of text datatype in one of the tables. I have specified that as below in corresponding hibernate mapping file..

Code:
<property name="EndorsementInstructions" type="java.lang.String" length="30000" lazy="true">
                <column name="EndorsementInstructions" sql-type="text"></column>
          </property>

Java code snippet -

Code:
Transaction tx = HibernateUtil.startTransaction();
Request_Text reqText = Request_TextHibernateDaoFactory.create().findRequest_Text(map);
reqText.setEndorsementInstructions(instructions); //it takes String
Request_TextHibernateDaoFactory.create().updateRequestText(reqText);
tx.commit();


And it gives me below exception -
Code:
Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]The DBMS returned an unspecified error.
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:731)
   at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:333)
   at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:115)


Can someone please help me out to resolve this error? Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 23, 2006 9:46 am 
Beginner
Beginner

Joined: Tue Jun 21, 2005 1:45 pm
Posts: 38
Guys, plz help!
I tried searching in google, and also went thro hibernate guide... but so far i couldnt find any solution to this problem... any help will be highly appreciated...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.