Thanks for suggesting that I check the generated HTML. Everything is there
where it is supposed to
be, i.e. Betty Ann for the firstname is in value = Betty Ann but on the form
only the Betty shows and not the Ann.
Any ideas?
Thanks

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
Pierre-Yves Saumont
Sent: Friday, May 18, 2001 11:08 AM
To: [EMAIL PROTECTED]
Subject: Re: jsp text in sql call


Hi, Barbara,

Seems that quotes are missing around the values.

When this kind of problem arise, you should have a look at the generated
HTML. It generally helps finding what's going wrong.

Pierre-Yves

-----Message d'origine-----
De : A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]De la part de
Barbara Johnson
Envoy� : vendredi 18 mai 2001 16:23
� : [EMAIL PROTECTED]
Objet : Re: jsp text in sql call


Can anyone tell me how to solve this problem?
I am making a series of forms for an educational application.
I am able to insert data into a database ok. When I look into MySql the data
is all there but when I
repopulate the form from the database, the words are truncated as soon as it
encounters a space.


Here is a sample of my code:




// query statement
Statement stmt = con.createStatement();
String queryStr = "SELECT firstname,lastname FROM author";
ResultSet rs = stmt.executeQuery(queryStr);


while (rs.next()){
     String firstname = rs.getString(1);
           String lastname = rs.getString(2);

<!--Repopulate form from database -->
<FORM name=authorform action="saveauthor.jsp" >

<td>

        <input name="firstname" size="30" value=<%= firstname%>>


        <input name="lastname" size="30" value=<%= lastname%>>

Thank you,
Barb Johnson
Instructional Programmer
Northeast Ohio Universities College of Medicine

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to