i modified the code for insert to save some of the info to a database while still saving the file to the server.
i used the load.getvalue to access the other formfields as prescribed.
and the code to save it is as follows
<%
If fileUploaded = True Then
' Checking to make sure if file was uploaded
If fileSize > 0 Then
' Connection string
Dim connStr
connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="
connStr = connStr & Server.MapPath("The_Pawn_Box.mdb")
' Recordset object
Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Products Info", connStr, 2, 2
' Adding data
rs.AddNew
rs("Name") = wants_to_sell
rs("Category") = category
rs("Username") = username
rs("Emailaddress") = emailaddress
rs("HomePhone") = homephone
rs("MobileNumber") = mobilephone
rs("Classification") = classification
rs("SubClass") = subclass
rs("Age") = age
rs("Price") = price
rs("BriefDescription") = briefdescription
rs("State") = selstate
rs("Pic") = pic
rs.Update
rs.Close
Set rs = Nothing
Response.Write "<p align=""center"">"
Response.Write "<font color=""green"">File and info were successfully uploaded..."
Response.Write "</font>"
Response.Write "</p>"
Else
' Connection string
' Dim connStr
connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="
connStr = connStr & Server.MapPath("The Pawn Box.mdb")
' Recordset object
'Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Products Info", connStr, 2, 2
' Adding data
rs.AddNew
rs("Name") = wants_to_sell
rs("Category") = category
rs("Username") = username
rs("Emailaddress") = emailaddress
rs("HomePhone") = homephone
rs("MobileNumber") = mobilephone
rs("Classification") = classification
rs("SubClass") = subclass
rs("Age") = age
rs("Price") = price
rs("BriefDescription") = briefdescription
rs("State") = selstate
rs("Pic") = "uploaded/" & category & ".gif"
rs.Update
rs.Close
Set rs = Nothing
Response.Write "<p align=""center"">"
Response.Write "<font color=""brown"">No file was selected for uploading but Ad details were placed"
Response.Write "...</font>"
Response.Write "</p>"
End If
else
Response.Write "<p align=""center"">"
Response.Write "<font color=""red"">File could not be uploaded..."
Response.Write "</font>"
Response.Write "<br>Please select a file before hitting the 'Submit'"
Response.Write " button."
Response.Write "</p>"
End If
If Err.number <> 0 Then
Response.Write "<p align=""center"">"
Response.Write "<br><font color=""red"">Something went wrong..."
Response.Write "</font>"
Response.Write "</p>"
End If
Response.Write fileName & " data uploaded..."
%>
this gives the corresponding error
Microsoft JET Database Engine error '80040e14'
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.