Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: insert multiple records using

Thread Tools

Re: insert multiple records using

Michael Ramey
Posts: n/a
Well you are only going to be able to insert one record at a time. Create
some nested loops to handle situations where both might be all.

if b = "all" and c="all" then

for each val in b
for each val in c
'insert code

elseif b="all"

for each val in b
'insert code

elseif c="all"

for each val in c
'insert code

end if


"Sileesh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
> Can any one help me out or give me some code of how to proceed.
> The scenario is
> I have 3 Dropdown List boxes. Let's say A, B and C. I am populating B

based on the selection In A. And C is populated based on selection In B.
> Based On Dorpdown List "C", I am getting records from the Database and

displayig in an HTMl Table.
> Now I have To Add an option "All" to The Dropdown Lists B and C. That

Means If "All" is selected in "B", then i have To insert a record in
database for each item in "C" to all items in "B".
> for ex: if i have 2 items in A, 3 items(exclu "All") in B and n Items(Excl

All) ( for each item in B) in C . Now If i select All In B then i have
insert "(n*1st Item)+(n*2nd Item)+(n*3rd Item)" records in Database at one
shot. I am using SQL server 2000
> How do i do this.
> Thx in advance

Reply With Quote

Thread Tools

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 Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Multiple Records Using One Insert Statemen with MySQLdb module Python 1 12-06-2008 12:47 PM
Best way to Insert multiple records into a table? Ian Macey ASP .Net 1 01-25-2005 02:11 PM
Insert Multiple Records at a time based on checkbox selection Vijay Pathak via .NET 247 ASP .Net 0 09-22-2004 06:53 AM
Submit Form Elements to Insert Multiple Records into a Database Sans Spam ASP General 8 05-24-2004 09:16 PM
insert multiple records shank ASP General 10 02-22-2004 10:43 AM