Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to do multiple inserts into SQL database throught ASP

Status
Not open for further replies.

salmaan

Programmer
Joined
Nov 26, 2002
Messages
3
Location
CY
I am getting (multiple)values from a list box (like 17,24,33,40 etc) which are unique emp ids. These values can be dynamic ie they can be more than two.These unique ids have common fields like dept., sal. etc which are common to all the ids
I need to seperate these values from the string and insert them as single rows, but the dept and sal columns are common.
For ex. from the list box 2 employees(1,2) are selected who have the common deptid(say 10) and common salary(say 5000).
1,2 have to be seperated and inserted in the database along with the deptid and sal. ie 2 rows have to be inserted in the database.
 

emps = split(request("empSelect"),",")

for i = 0 to uBound(emps)
'create individual querystrings and execute them
'or execute a stored procedure
next

-- Just trying to help...
[wolf]<--- This is a wolf? We need a new icon.......
mikewolf@tst-us.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top