Meaningless Drivel is fun!*
The moose likes JSP and the fly likes why i can't get the whole string when rs.getString() called ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "why i can Watch "why i can New topic
Author

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

Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
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

Joined: Feb 18, 2003
Posts: 166
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.


Jeremy Wilson
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30595
    
154

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
i using mysql and using jdbc driver
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
thanks, Jeanne Boyarsky ...yes, is the problem of quote
nareshkumar kumar
Greenhorn

Joined: Jan 19, 2005
Posts: 3
u can place that one in the " "
 
GeeCON Prague 2014
 
subject: why i can't get the whole string when rs.getString() called ?