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 > Update problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-06-03, 05:54
speng speng is offline
Registered User
 
Join Date: Feb 2003
Posts: 2
Update problem

HI,

I have a detail page that will list all records in a table with an ID passed by the url on the previous page. The page uses repreat region to list X amount of records with that ID.

What I am trying to do is make all records on the page editable or able to update all records at the same time.

Can this be done?

Does each record have to be in a seperate form with a seperate submit button, or can you have one form and one button to update the whole page. Ideally I want the page to have the appearance of an Excel or Access spreadsheet, where you can modify any of the text fields.

Can anyone give me any help or does anyone know any tutorials that might help.

Thanks,

J.
Reply With Quote
  #2 (permalink)  
Old 02-06-03, 11:55
speng speng is offline
Registered User
 
Join Date: Feb 2003
Posts: 2
I guess what I mean is a batch update or to submit multiple records for update.

Any help or useful links would appreciated,

Thanks.
Reply With Quote
  #3 (permalink)  
Old 02-06-03, 12:44
ZeligOn ZeligOn is offline
Registered User
 
Join Date: Feb 2003
Location: Los Angeles
Posts: 18
Re: Update problem

Quote:
Originally posted by speng
Can this be done?
Yes, this can be done and it's very simple,
all you need to do is a loop inside form that
gets all the ID's and list them into text boxes
(if you like it to look like Excel or Access
spreadsheet you need to change the look/style of the text box)
for each text box you give the same name + the Var from the loop
for example :

For I = 0 To Rs.RecordCount
response.write "<Input Type=Text Name='ID"&I&"' Value='"Rs("ID")"'>
Loop

now you got all the ID's in text boxes, when submit you make
the same query that you made on the form page and run a loop
to generate a SQL query to Update/Insert the values

SQL = "Update . . . . ."
For I = 0 To Rs.RecordCount
SQL = SQL & Request.Form("ID"&I)
Loop

NOTE : you need to make your own SQL query, this is just the concept!


you can use this as a reference :

http://www.aspin.com
http://www.asphelp.com
http://4guysfromrolla.aspin.com
http://www.haneng.com/
And my favorite - http://www.devguru.com
__________________
Eddie.
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