If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > retrieve, update and insert records problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-01-04, 12:59
-Dman100- -Dman100- is offline
Registered User
 
Join Date: Jan 2004
Posts: 124
retrieve, update and insert records problem

I have a form with 6 fields (combination of dropdown menus and textboxes).
I populate the dropdowns from database tables. I have a loop that creates a
new row for the 6 fields in the form, so a user can insert as many records as needed (6 fields equal 1 record).

When a user submits the form, I use a loop to iterate through each row and
insert the records into the database.

I would like the user to be able to retrieve the fields they inserted, make
changes or add additional records and update.

Is there a way to re-populate the fields with the records that the user
submitted to the database, have the ability to change all the information
just like a user was inserting a new record (only they are editing a current record) and also be able to add to rows for inserting new records?

The fields are related to another database table. So, these records are
actually details of a master table (1 to many relationship). Each master
record has many detail records. So, I want the user to be able to edit
their detail records or add new detail records.

It is easy enough to create a sql query for all the detail records and bind
to the page. But, I need for example, to retrieve the value that was
inserted from a dropdown menu and still include the original values from the
dropdown if the user wants to change it.

Also, if the user views their current details, but only wants to add new
detail records, then the previously inserted records aren't re-inserted, but
only the new records are added.

I hope my post made sense. I'm not sure how to create this type of functionality on a form? If it is possible? Any suggestions on how to accomplish this?

Thanks for any help.
-Dman100-
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On