This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to retrieve text datatype

 
arun mahajan
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I was working on JSP with SQL Server 7.0. In one of my table I have a field with "Text" as datatype. When I make a result set and try to retrieve the data against getString() it failed and gives error that it cannot re-read the field though I am trying to retrieve only once.
I also tried with getObject() method and try to put the result into a string object(String xx = ne String()) but it says left hand and right hand objects are not same.
But If I change the datatype to varchar it works very well with getString() method.
I have two questions:
1. Is string is not an object if taken as String xx = new String()?if yes why it is giving error that two object on left and right hand side is not ok?
2. Can't I pick data through getString() method if data type is TEXT.
Plhelp.
regards
Arun
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
post the code that is giving you the SQLException along with the exact error message. This should help us help you.
As a guess, the length of the text field may be causing you problems. If the field is over a certain size, you may have to stream the data in.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic