INSERT INTO <--inserting data into db
I think I put this in the wrong place before...got no hits.
I'm trying to get the insert working first with just the mandatory fields. Please tell me what I'm doing wrong.
<%
Dim strInsert
Dim strValues
strInsert = "uiid,company,addr,city,state,zip,phone"
strValues = Request.Form("uiid") & "," & Request.Form("company") & _
"," & Request.Form("addr") & "," & Request.Form("city") & _
"," & Request.Form("state") & "," & Request.Form("zip") & _
"," & Request.Form("phone")
sSQL = "INSERT INTO vendor (" & strInsert & ") VALUES ('" & strValues & "')"
Set rs = connect.Execute(sSQL)
%>
I get the following error:
Error Type:
Microsoft JET Database Engine (0x80040E14)
Number of query values and destination fields are not the same.
/eforms/testOrder/vendor/multi_uid_results.asp, line 38
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Page:
POST 166 bytes to /eforms/testOrder/vendor/multi_uid_results.asp
POST Data:
uiid=123123123&fein=&company=A+big+Comp&attn=&addr =here&addr2=&city=Champaign&state=IL&zip=61820&cou ntry=United+States&phone=333-4444&fax=&email=&firstname=&lastname=
Line 38 = Set rs = connect.Execute(sSQL)
|