KINDA LATE .. ARENT U ???
:)
Regards
Rohit Parik
----- Original Message -----=20
From: Poornima Visvesvaran=20
To: [EMAIL PROTECTED]=20
Sent: Saturday, May 19, 2001 1:56 PM
Subject: Re: jsp text in sql call
Add aphostrophy in the value field like below.
<input name=3D"firstname" size=3D"30" value=3D"<%=3D
firstname%>">
<input name=3D"lastname" size=3D"30" value=3D"<%=3D
lastname%>">
I hope this will solve the problem
Poornima Visvesvaran.
--- Barbara Johnson <[EMAIL PROTECTED]> wrote:
> 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 =3D con.createStatement();
> String queryStr =3D "SELECT firstname,lastname FROM
> author";
> ResultSet rs =3D stmt.executeQuery(queryStr);
>
>
> while (rs.next()){
> String firstname =3D rs.getString(1);
> String lastname =3D rs.getString(2);
>
> <!--Repopulate form from database -->
> <FORM name=3Dauthorform action=3D"saveauthor.jsp" >
>
> <td>
>
> <input name=3D"firstname" size=3D"30" value=3D<%=3D
> firstname%>>
>
>
> <input name=3D"lastname" size=3D"30" value=3D<%=3D
> 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