%@ Language=VBScript %> <%Response.Buffer=True Response.ExpiresAbsolute = Now()-1%>
<% accessdb="_echeckout\data\NCAMIdata.mdb" myDSN="DRIVER={Microsoft Access Driver (*.mdb)};" myDSN=myDSN & "DBQ=" & server.mappath(accessdb) & "; uid=admin;pwd=enami" dim conntemp2, rstemp2 set conntemp2=server.createobject("adodb.connection") conntemp2.open myDSN set rstemp2=conntemp2.Execute("SELECT * FROM tblEducationalMaterials;") If Request.Form("submit") = " ADD TO ORDER " Then If isObject(Session("objOrder")) Then '-- Use the Object from the Session Set objOrder = session("objOrder") Else '-- Create one if we can't find it Set objOrder = Server.CreateObject("NCNAMI.NAMIOrder") End If Select Case Request.Form("submit") Case " ADD TO ORDER " 'Add the record to the COM recordset For each i in Request.Form If left(i, 10) = "txtHelpqty" Then varLine = Right(i, len(i)-10) varID = "IDNo" & varLine varProd = "txtPRODID" & varLine varQty = "txtHelpqty" & varLine varDesc = "txtPRODDesc" & varLine varAmt = "txtAMT" & varLine varTot = "txtHelpTot" & varLine If Len(Request.Form(varQty)) > 0 and Not isnull(Request.Form(varQty)) Then objOrder.AddRecord CInt(Request.form(varID)), CDate(Trim(now())), CInt(Request.Form(varProd)), Request.Form(varDesc), CInt(Request.Form(varQty)), CCur(Request.Form(varAMT)), CCur(Request.Form(varTot)) End IF End IF Next 'set the records to the Recordset object set RS = objOrder.GetRecords intrecordsadded = rs.RecordCount 'Response.Redirect "orderview.asp" Response.Write "You have ordered " & intrecordsadded & " item(s)." %> Click
OR
to complete your order. You may also add other items to your order.
<% End Select
End IF
%>