I'm using SQL server on godaddy.com, and for the life of me, tried all freakin day yesterday to get a form to send data to my table, and can't get it to work for the life of me
I think the asp form sends the information to the asp page that is to add the information to the tables correctly, but am not entirely sure, so here is the code for the form:<html><head><title>Form Entry</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><form method="post" action="add.asp"><table><tr><td>CustomerID:</td><td><input name="CustID"></td></tr><tr><td>Company Name:</td><td><input name="Company"></td></tr><tr><td>Contact Name:</td><td><input name="Contact"></td></tr><tr><td>Address1:</td><td><input name="Address1"></td></tr><tr><td>Address2:</td><td><input name="Address2"></td></tr><tr><td>Address3:</td><td><input name="Address3"></td></tr><tr><td>City:</td><td><input name="City"></td></tr><tr><td>State:</td><td><input name="State"></td></tr><tr><td>Zip:</td><td><input name="Zip"></td></tr><td>Email:</td><td><input name="Email"></td></tr><tr><td>Phone:</td><td><input name="Phone"></td></tr></table><br /><br /><input type="submit" value="Add New"> <input type="reset" value="Cancel"></form></body></html>
Now for the page that is giving me the problem (I think). I'm pretty sure I'm fudging up the connectivity somewhere because all I get is an http 500 error every time I try to upload the information. Why won't it bloody connect?!?!Also, is the DIM function on this page used to hide important information? If you guys can help me fix this, I'd be incredibly, incredibly greatful, I'm frustrated out of my mind!<%@LANGUAGE="JAVASCRIPT" CODEPAGE="CP_ACP"%><html><head><title>piece of shit page</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><%Dim oConn, oRsDim qry, connectstrDim db_name, db_username, db_userpasswordDim db_serverdb_server = "whsql-v22.prod.mesa1.secureserver.net"db_name = "Fulfillment"db_username = "Fulfillment"db_userpassword = "your_password"tablename = "KSEP_Customers"connectstr = "Driver={SQL Server};SERVER=" & db_server & ";DATABASE=" & db_name & ";UID=" & db_username & ";PWD=" & db_userpasswordset conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/webdata/northwind.mdb"sql="INSERT INTO customers (CustID,companyname,"sql=sql & "contactname,address,city,postalcode,country)"sql=sql & " VALUES "sql=sql & "('" & Request.Form("CustID") & "',"sql=sql & "'" & Request.Form("Company") & "',"sql=sql & "'" & Request.Form("Contact") & "',"sql=sql & "'" & Request.Form("Address1") & "',"sql=sql & "'" & Request.Form("Address2") & "',"sql=sql & "'" & Request.Form("Address3") & "',"sql=sql & "'" & Request.Form("City") & "',"sql=sql & "'" & Request.Form("State") & "',"sql=sql & "'" & Request.Form("Zip") & "',"sql=sql & "'" & Request.Form("Email") & "',"sql=sql & "'" & Request.Form("Phone") & "')"on error resume nextconn.Execute sql,recaffectedif err<>0 then Response.Write("No update permissions!")else Response.Write("<h3>" & recaffected & " record added</h3>")end ifconn.close%></body></html>