Tuesday, March 20, 2012

ASP - Insert Multiple records

I wanna know how to insert all the records that is checked into my SQL Server.. BUT all the records inserted is the same except for one column in my SQL Server which is the 'Partner' column..All the records that is checked?
Please explain some more!|||Well... i have a webpage in ASP. It displays all the ringing tones on the particular tones.asp page. Currently there is no check box as I do not know how to implement the method..

Therefore what i mean is that all the ringtones (to insert as new record in db), I have to view one by one to insert.

What i want to know is the way on how to mass insert all the ringtones with just a single click on the button. Meaning that i checked a few check boxes, and click the button..

You know what i mean my fren..?

Hope you can help..|||BTW, its sort of like the HOTMAIL... where you checked some boxes and PUT INTO FOLDER.... bla bla bla..

But what i want now is checked my ringtones check boxes and click a button to insert as a new record in my DB..|||<%
If len(trim(Request.Form("mTones"))) > 0 Then
Dim SQLStmt, x
SQLStmt = ""
for x = 1 to request.form("mTones").count
SQLStmt = SQLStmt & "INSERT INTO kek (tone) VALUES('"request.form("mTones")(x) & "';"
next
conn.execute(SQLStmt)
end if
%>

<form methos=post action=tones.asp>
<input type=checkbox name="mTones" id="tone1">tone1
<input type=checkbox name="mTones" id="tone2">tone2
<input type=submit>
</form>sql

No comments:

Post a Comment