Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. 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 Professional 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
 
Old June 1st, 2007, 05:45 AM
Authorized User
 
Join Date: Mar 2007
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default help writing dynamic form data to dynamic table

I have a dynamic form and a dynamic table (both generated by an asp 'wizard'), so I need a dynamic way of writing the form data from the dynamic form to the dynamic table.
So far, I can get the table field names and the form field names (both in order), but I cannot seem to get the loop(s) right to marry the two. Any ideas? A sample would be terrific. I am under a deadline, so any responses are greatly appreciated.

Please note that because this question is a combination of asp and sql, it is posted in both forums in order to gain optimum response.

thanks
Ublend

 
Old June 1st, 2007, 08:08 AM
Authorized User
 
Join Date: Mar 2007
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quick thanks to all who viewed my question --
I figured out that I was overthinking the process when the solution was pretty simple. The key to it was remembering that the dynamic form element names are always the same as the dynamic table field names for this application. Here is a sample of the code for those who may ask the same question in the future:
Set RSC = Server.CreateObject("ADODB.Recordset")
RSC.Open myTable, Conn, 2, 2
      RSC.addnew
      For ix = 1 to Request.Form.Count-1
      RSC(Request.Form.Key(ix)) = Request.Form.Item(ix)
    Next
    RSC.update
RSC.close






Similar Threads
Thread Thread Starter Forum Replies Last Post
help writing dynamic form data to dynamic table ublend SQL Server ASP 1 June 1st, 2007 08:09 AM
Pivot Table Dynamic Reference Data oyelesit Excel VBA 2 August 4th, 2006 07:28 AM
problem writing dynamic value into text file in ph method PHP How-To 0 February 6th, 2006 02:05 PM
Dynamic check boxes writing to database..help!! cincinnaticj7 Classic ASP Databases 0 January 25th, 2005 10:47 AM
Entering data to dynamic table cells weebadbilly XSLT 0 June 30th, 2004 07:15 AM





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