form to ".asp"

Results 1 to 2 of 2

Thread: form to ".asp"

  1. #1
    Anxious2Know Guest

    Default form to ".asp"

    here is my code... could someone help me and figure out why the process of saving data to my ".mdb" doesn&#039t work and just sits there... I have a ".html" with a form that uses "method=GET"(not sure which I should use.. GET or POST) then I have a ".asp" which is supposedly coded to take the data from the ".html" form and put it into an "access .mdb" and I am having major problems... please please save me.. this is for my job, and if I don&#039t get this done I&#039m screwed..

  2. #2
    Anxious2Know Guest

    Default RE: form to (sorry here is the code!!!)

    &#060;%@ LANGUAGE="VBSCRIPT" %&#062;<BR>&#060;%<BR>&#039create object to store recordset<BR>dim rs<BR>dim strconn<BR>dim conn<BR><BR>&#039it doesn&#039t display hello anywhere when I uncomment this next line :(<BR>&#039response.write("hello")<BR><BR>set conn = server.createobject("adodb.connection")<BR><BR>con = "driver={microsoft access driver (*.mdb)};dbq=" & server.mappath("../data/support.mdb")<BR><BR>rs = Server.createobject("adodb.recordset")<BR> "tblMain", conn<BR><BR>&#039use the addnew method of the recordset object to add a record<BR>rs.addnew<BR><BR>&#039add data to database from input on new.html form<BR>rs("Company") = request.form("txtCompany")<BR>rs("Name") = request.form("txtName")<BR>rs("Address") = request.form("txtAddress")<BR>rs("City") = request.form("txtCity")<BR>rs("StateProv") = request.form("txtStateProv")<BR>rs("Postal") = request.form("txtPostal")<BR>rs("Zip") = request.form("txtZip")<BR>rs("Phone") = request.form("txtPhone")<BR>rs("Fax") = request.form("txtFax")<BR>rs("Email") = request.form("txtEmail")<BR>rs("ProdName") = request.form("lstProdName")<BR>rs("ProdVersion") = request.form("txtProdVersion")<BR>rs("ProdSerial") = request.form("txtProdSerial")<BR>rs("Supplier") = request.form("txtSupplier")<BR>rs("OS") = request.form("lstOS")<BR>rs("Machine") = request.form("txtMachine")<BR>rs("OtherSoftware") = request.form("txtOtherSoftware")<BR>rs("Cause") = request.form("txtCause")<BR>rs("Result") = request.form("txtResult")<BR>rs("Continue ") = request.form("lstContinue")<BR>rs("Other") = request.form("txtOther")<BR>rs("ReportDate") = Date()<BR>rs("Solved") = request.form("txtSolved")<BR>rs("ProbBrief") = request.form("txtProbBrief")<BR>rs("ProbFull") = request.form("txtProbFull")<BR>rs("SolBrief") = request.form("txtSolBrief")<BR>rs("SolFull") = request.form("txtSolFull")<BR><BR>&#039save changes to database<BR>rs.update<BR><BR>rs.close<BR>conn.clos e <BR>set conn = nothing<BR>set strconn = nothing<BR>set rs = nothing<BR>%&#062;<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts