Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why i can't get the whole string when rs.getString() called ?

 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i using rs.getString("pro_desc") to get the data from field , the data let say suppose to be "this is just testing" in the "pro_desc" field(varchar(100)) but after i run rs.getString() ...it only show me "this" word but other have lost ..

i get data from DB and pass it to html textfield as following code


can i know what is the problem ? thank you
 
Jeremy Wilson
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you include information on what type of database and a sample of what your code looks like, that would help. Basically wondering if you are using the jdbc to odbc bridge.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34375
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alvin,
You need quotes around the value attribute:

Otherwise, the browser only uses the attribute value up to the space. The rest would be interpretted as another attribute that the browser doesn't understand.

I'm moving this to the JSP forum because it is more about JSP formatting than JDBC.
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i using mysql and using jdbc driver
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, Jeanne Boyarsky ...yes, is the problem of quote
 
nareshkumar kumar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u can place that one in the " "
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic