I have a form which asks the user the quantity of equipment that needs to be scanned. A loop begins and creates input boxes to the exact number the user enters.
Now I am trying to add the equipment into the database. Again I am using a loop for the quantity that the user chose. The problem is the serial and cam# need to be auto populated in the sql statement, like ser1, cam1 then ser2, cam2 and so forth. Here is the code I have now, can this be fixed?
I have a form which ask the user the quantity of equipment that needs to be scanned. A loop begins and creates input boxes to the exact number the user enters. Is there a way to name the boxes as they are being created during the loop so that i can in turn upload the information to my database?
Here is what I have:
for i = 1 to quantity
cam = request.form("cam" + i)
ser = request.form("ser" + i)
sql="INSERT INTO inventory ([sto_or_po],[date_rcv],[source],[location],[dealer_num],[manuf],[model_num],[condition],[serial_num],[cam_id]) VALUES "
sql=sql & "('" & sto & "','" & dater & "','" & source1 & "','" & location & "',"
sql=sql & "'" & dealer & "','" & manufacturer & "','" & model & "','" & condition & "','" & ser & "','" & cam & "')"
Set RS = oConn.Execute(sql)
set rs=nothing
next
Now I am trying to add the equipment into the database. Again I am using a loop for the quantity that the user chose. The problem is the serial and cam# need to be auto populated in the sql statement, like ser1, cam1 then ser2, cam2 and so forth. Here is the code I have now, can this be fixed?
I have a form which ask the user the quantity of equipment that needs to be scanned. A loop begins and creates input boxes to the exact number the user enters. Is there a way to name the boxes as they are being created during the loop so that i can in turn upload the information to my database?
Here is what I have:
for i = 1 to quantity
cam = request.form("cam" + i)
ser = request.form("ser" + i)
sql="INSERT INTO inventory ([sto_or_po],[date_rcv],[source],[location],[dealer_num],[manuf],[model_num],[condition],[serial_num],[cam_id]) VALUES "
sql=sql & "('" & sto & "','" & dater & "','" & source1 & "','" & location & "',"
sql=sql & "'" & dealer & "','" & manufacturer & "','" & model & "','" & condition & "','" & ser & "','" & cam & "')"
Set RS = oConn.Execute(sql)
set rs=nothing
next