How Can I Update Multiple Records
Hi there
I was wondering if somebody could help me with the following problem. I am using ASP and SQL Server.
I have a table in SQl Server which contains product information. One of the columns is called OrderNo and is an int field. On my simple update page the administrator chooses a value for OrderNo (ranging from 1st to 10th, or 1 to 10) and on the front end the recordset is ordered by this OrderNo field. So, the product with OrderNo=1 will display first, then OrderNo=2 etc. This is OK but when I add a new record to the database using my insert page, I then have to change the Order of all the records in the database.
What I would like to do is this:
Have a results page which contains all records in my database, and in the column for OrderNo, have a dropdown box in each record. I can then change the order of all the products from this one page and then click on one update button which would update all the records accordingly.
BUT, I don't know how to write the stored procedure/ASP to go this.
Can anyone help me out?
Thanks in advance
Lucy
|