Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 17th, 2004, 09:51 AM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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


Reply With Quote
  #2 (permalink)  
Old July 17th, 2004, 10:19 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
Reply With Quote
  #3 (permalink)  
Old July 18th, 2004, 08:05 AM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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


Reply With Quote
  #4 (permalink)  
Old July 18th, 2004, 08:53 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
Reply With Quote
  #5 (permalink)  
Old July 19th, 2004, 02:02 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi
 access this link to have an idea of accessing memo fields

http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=138



Reply With Quote
  #6 (permalink)  
Old July 19th, 2004, 10:49 AM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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


Reply With Quote
  #7 (permalink)  
Old July 19th, 2004, 09:59 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Mischa,

Glad, that it works. But wondering if there was any change made to get that worked.

Cheers!

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Populating TreeView Control using Access Database dotnetDeveloper ADO.NET 0 November 18th, 2008 12:58 PM
problem in populating datasheet ...... sms Access 4 June 1st, 2008 03:47 AM
Problem populating DataGridView MacDevv C# 2005 0 May 6th, 2008 08:50 AM
using memos of ms-access b100dh0und Pro JSP 0 January 29th, 2006 10:30 AM
Problem with Populating ListView Brian_Leigh65 VB Databases Basics 3 August 2nd, 2004 08:19 AM



All times are GMT -4. The time now is 03:32 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.