Hello all,
I have some information that I would like to combine into one submit I appreciat the help
<%
strwkn = Request.form("wkn"
strsrv = request.form ("srv"
strvslvoy = Request.form("vslvoy"
stretd = Request.form("etd"
SET db = Server.CreateObject("ADODB.Connection"
db.Open "DSN=dsn", "id","pass"
SQL = "Insert into vsl (wkn, vslvoy, srv, etd,Values ('" & strwkn & "', '" & strvslvoy & "', '" & strsrv & "', '" & stretd & "')"
db.execute(SQL)
next statement that I would like to add in is
CheckboxStr = "ckbox"
Inputs = Split("jpn,kor,twn.khh,hkg",","
InputReference = Split("ga",","
for each element in request.form
If request(element) = "ON" Then
DBStr1=""
DBStr2=""
For InputVar = 0 To Ubound(Inputs)
DBStr1 = DBStr1 & InputReference(InputVar)
DBStr2 = DBStr2 & "'" & Replace(Request(Inputs(InputVar) & Replace(element,CheckboxStr,""
),"'","''"
& "'"
If InputVar < Ubound(Inputs) Then DBStr1 = DBStr1 & ", "
If InputVar < Ubound(Inputs) Then DBStr2 = DBStr2 & ", "
Next
SQLStr = "Insert INTO apup(" & DBStr1 & "
VALUES(" & DBStr2 & "
"
conn.Execute(SQLStr)
End if
Next
I have some information that I would like to combine into one submit I appreciat the help
<%
strwkn = Request.form("wkn"
strsrv = request.form ("srv"
strvslvoy = Request.form("vslvoy"
stretd = Request.form("etd"
SET db = Server.CreateObject("ADODB.Connection"
db.Open "DSN=dsn", "id","pass"
SQL = "Insert into vsl (wkn, vslvoy, srv, etd,Values ('" & strwkn & "', '" & strvslvoy & "', '" & strsrv & "', '" & stretd & "')"
db.execute(SQL)
next statement that I would like to add in is
CheckboxStr = "ckbox"
Inputs = Split("jpn,kor,twn.khh,hkg",","
InputReference = Split("ga",","
for each element in request.form
If request(element) = "ON" Then
DBStr1=""
DBStr2=""
For InputVar = 0 To Ubound(Inputs)
DBStr1 = DBStr1 & InputReference(InputVar)
DBStr2 = DBStr2 & "'" & Replace(Request(Inputs(InputVar) & Replace(element,CheckboxStr,""
If InputVar < Ubound(Inputs) Then DBStr1 = DBStr1 & ", "
If InputVar < Ubound(Inputs) Then DBStr2 = DBStr2 & ", "
Next
SQLStr = "Insert INTO apup(" & DBStr1 & "
conn.Execute(SQLStr)
End if
Next