HELP: Need help with FP2003, MS Access, ASP and text boxes

J

John

Hi all
I've already asked this question, and many thanks to all the helpers,
but the solutions don't work so I shall rephrase the question....

How can I display a fields value from a recordset within a text box
with ASP.
I have tried every possible combination of "quotes", and when I do
manage to get something displayed, the value displayed is cut short
after the first word, although the info IS in the database.

Please help, I'm desperate.

TIA
 
T

Thomas A. Rowe

Are you writing your code by hand or with FP database components?

If by hand, you would/should be doing something like the following:

<%
Member = Request.Form("MemberID")

Set objRS = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT * FROM Members WHERE MemberID = '" & Member & "' "
objRS.Open SQL, DSN_Name
%>

Then in the form...

<form method="POST" action="memberupdate.asp">
<input type="hidden" name="Action" value="Update">
<table border="0" width="100%">
<tr>
<td width="30%">First Name</td>
<td width="70%">
<input type="text" size="23" name="FirstName" value="<%=objRS("FirstName")%>"></td>
</tr>
<tr>
<td width="30%">Last Name</td>
<td width="70%">
<input type="text" size="23" name="LastName" value="<%=objRS("LastName")%>"></td>
</tr>
<tr>
<td width="100%" colspan="2" valign="middle" align="center">
<input type="submit" value="Submit Update" name="btnSubmit"></td>
</tr>
</table>
</form>

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
B

Bob Lehmann

Are there quotes within the text being displayed?

If so, you will need to encode the text....

value="<%=Server.HTMLEncode(rs("field_name"))%>"

Bob Lehmann
 
Top