|
| |
|
|
akalana
Posts: 15 Joined: 10/17/2003 Status: offline
|
Access Saves First Word Only in Request.Form Post - 12/29/2004 10:23:35
I have 3 pages. The first is a form, the second a preview page and the third is the confirmation page. On the first form page - the user enters data into a field called body. The user then submits through post to the preview page. Now on the preview page - there it displays whatever was passed from the form body field and display it in its entirety fine. So on preview I have in there: <%Response.Write Request.Form("BODY")%> That works fine. Now, since I want to pass this field also to the confirmation page, I have a hidden field below called: <input type="hidden" name="BODY" value=<%Response.Write Request.Form("BODY")%>> on the preview page. So I have another submit button on the preview page, which when the user sees, and is satisfied with the preview- submits to the confirmation page. Now the confirmation page is just a simple insert sql statement. vBODY=Request.Form("BODY") strsql=INSERT INTO NOTIFICATION BODY VALUES '" & vBODY &"' In my Access Database, I have a memo field called BODY in the notification table. The issue I'm having is the BODY field in the database only captures the first word of whatever was entered in the form's body field. So if in the form I wrote " This is a test", then the Access Database would only display in the BODY field "This". It does not capture every other word. For some reason, it is dropping the rest of the words and only saving the first word. I was curious if there was a way around it so I still keep my preview page. Thanks in advance.
|
|
|
|
Giomanach
Posts: 6136 Joined: 11/19/2003 From: England Status: offline
|
RE: Access Saves First Word Only in Request.Form Post - 12/29/2004 11:17:33
strBody=Request.Form("BODY") Try setting the Body info as a string variable, rather than just a variable
_____________________________
|
|
|
|
akalana
Posts: 15 Joined: 10/17/2003 Status: offline
|
RE: Access Saves First Word Only in Request.Form Post - 12/29/2004 12:37:06
Hm..thanks.. Still giving me issues... Is there a way to declare BODY as a string? I did: dim strBODY strBODY=CStr(Request.Form("BODY")) on the preview page. When I response.write strBODY on the preview page, it appears just fine. I also created <input type="hidden" name="strBODY" value= <% Response.Write strBODY %>> in hopes of passing to the confirmation page. I'm still facing the same issue. On the confirmation page, I did a response.write for the passed body field, and it only displayed the first word instead of all the BODY field text.
|
|
|
|
Giomanach
Posts: 6136 Joined: 11/19/2003 From: England Status: offline
|
RE: Access Saves First Word Only in Request.Form Post - 12/29/2004 13:28:40
quote:
<input type="hidden" name="strBODY" value= <% Response.Write strBODY %>> Should be: <input type="hidden" name="strBODY" value="<% Response.Write " & strBODY & " %>">
_____________________________
|
|
|
|
akalana
Posts: 15 Joined: 10/17/2003 Status: offline
|
RE: Access Saves First Word Only in Request.Form Post - 12/29/2004 17:23:52
Thanks Giomanach for your response. What I did to work was declare BODY on the preview page as: dim BODY BODY=CStr(Request.Form("BODY")) Then utilize it as a hidden field: <input type="hidden" name="BODY" value="<% Response.Write BODY %>"> When I posted to the confirmation page to write to the database, I redeclared: strBODY = Request.Form("BODY") And in my insert statement: INSERT INTO NOTIFICATION (BODY) VALUES ('" & strBODY &"') This worked beautifully. Thanks.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|