Solved

Multiple Insert to table

Posted on 2003-11-26
4
302 Views
Last Modified: 2010-04-25
I have developed a training registration web app. I am tryiing to add attendance tracking to it. The problem I have is when the trainer selects the class, they get a listing (detail page) of all the students who have registered. I added a field called (attended - yes \ no) to my table and add a check box to the listing. When I submit the form, all the students update 1 record.

How do I do submit multiplte records to the database. I saw something that showed how to update multiplte table (with 1 record) utlizing commands, but I have not used this function yet.
0
Comment
Question by:jkatz2
4 Comments
 
LVL 23

Expert Comment

by:adilkhan
ID: 9834901
jkatz2 I need more Details about your Questions.
What you trying to say this You want to update MULTIPLE Tables by doing one Click or Multiple Fields within one Table?

if Multiple Tables Then run your Code Line BY Line to do whatever you want, if Updating one Table and Multiple Fields then all you have to do this Update/Modify your Sql Statement.

Let me know what you need.
0
 

Author Comment

by:jkatz2
ID: 9835329
I need to update 1 table with several records. I have a listing of customers Fname \ Lname \ ect, and a field (attended) that needs to be updated for each record. There can be up to 20 records showing?

0
 
LVL 15

Expert Comment

by:gladxml
ID: 9982965
0
 
LVL 2

Accepted Solution

by:
g8tor23 earned 300 total points
ID: 10112568
jkatz,

I think I know what you're getting at...but your terminology  was confusing me. You aren't submitting (i.e. inserting) multiple records to the db, you're updating multiple records.

There is a good, relevant tutorial at:

http://www.newmanzone.com/recipes/recipe.asp?LinkID=1

Those he's talking about batch deletes, the concept is exactly the same for you, except you're going to be updating.

The general idea is that each checkbox needs to be unique (i.e. the registants memberID or whatever you're using). Then you have to do a little hand coding to loop in the update statement

Here's an exaple of what your checkbox code should be like:

<input name="MM_recordId" type="checkbox" id="MM_recordId" value="<%= rsGetMembers.Fields.Item("MemberID").Value %>">

Basically your form will have all the folks - each in a separate row - with a checkbox for registered/not registered beside each. You go down the list, check the ones you want, then submit the form.


There is very little hand coding required to do this, and you'll find this is very easy to do!

Any questions, just ask. Hope this helps!

-g8tor23
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now