 |
| Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

July 17th, 2004, 09:51 AM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Populating memos in Access problem
Hi,
I am using the following piece of code to populate a DB from a form.
dim intCounter
For intCounter = 1 To Request.Form.Count
Dim sFormElementName
sFormElementName = Request.Form.key(intCounter)
Dim sFormElementValue
sFormElementValue = Server.HTMLEncode(Request.Form.item(sFormElementNa me))
If sFormElementValue <> "" And sFormElementValue <> "No Answer" And sFormElementName <> "Submit" And sFormElementName <> "page" Then
oRSallUsers(sFormElementName) = sFormElementValue
End If
oRSallUsers.Update
Next
For some reason it wonât populate fields in the DB of âmemoâ type, but works just fine on all other data types. Iâm using an Access DB. Any help would be much appreciated.
Thanks, Mischa
|
|

July 17th, 2004, 10:19 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Can you do a response.write of sFormElementValue and see if the memo field values get stored into this properly?
Code:
FOR...
...
response.write sFormElementValue & "<BR>"
...
Loop
Are you using a <textarea>in your form for getting the memo field value? Can you post that html code too?
Cheers!
_________________________
- Vijay G
Strive for Perfection
|
|

July 18th, 2004, 08:05 AM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Vijay,
I actually had a âResponse.Writeâ like this in the code, but I removed as it wasnât directly involved with the DB issue. It writes the value just fine, so the âmemo fieldsâ are being stored properly.
Sure, html code from form:
<form action="signUp.asp" method="post" name="signUpInfo" id="signUpInfo">
â¦.
<textarea name="DescribeYourSelf" cols="50" rows="4" id="DescribeYourSelf"></textarea>
â¦.
</form>
Thanks, M
|
|

July 18th, 2004, 08:53 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Mischa,
Just noticed. You are using this code within your FOR loop. Anyways I don't think that would be the cause for not getting your memo field values in the DB.
oRSallUsers.Update
Can you move that outside the FOR loop? because this tries to update the DB for every field and hits the DB many times which can be done at the end after storing all the values in the recordset.
Also I believe you are just doing an update, as I don't see an ADDNEW() method there before the FOR loop.
Can you post some sample data that you are trying to update in the memo field. I would like to take a look at it if that could give us some clue.
Just a thought, why don't you construct an SQL statement for UPDATE and run that from you ASP page and see if that too fails to do the job?
Cheers!
_________________________
- Vijay G
Strive for Perfection
|
|

July 19th, 2004, 10:49 AM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Magically this started working again! I mean it â like magic. I ran it again with the field as âmemoâ and it got correctly populated. Tried it a bunch more times: no problem. Maybe I was working too long yesterday â started to lose it.
Anyway, thanks, gents
|
|

July 19th, 2004, 09:59 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hi Mischa,
Glad, that it works. But wondering if there was any change made to get that worked.
Cheers!
_________________________
- Vijay G
Strive for Perfection
|
|
 |