fogofogo
09-13-2005, 07:05 PM
Hi All,
I'm having a bit of a problem inserting some info into a database. Heres my code:
<%
dim strFirst
dim strEmail
strFirst = Request.Form("name")
strEmail = Request.Form("email")
Response.Write(strFirst) & "<br>"
Response.Write(strEmail)
MyPath=Server.MapPath("emails_names.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & MyPath
SQL = "INSERT INTO details (Name, Email) VALUES ('"&strFirst&"','"&strEmail&"')"
conn.Execute(SQL)
%>
and heres the error message:
"Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/flash_capture/project3/processForm.asp, line 21"
Line 21 is conn.Execute(SQL). I'm fairly new to asp so I apologise if the error is blindingly obvious.
Thanks
I'm having a bit of a problem inserting some info into a database. Heres my code:
<%
dim strFirst
dim strEmail
strFirst = Request.Form("name")
strEmail = Request.Form("email")
Response.Write(strFirst) & "<br>"
Response.Write(strEmail)
MyPath=Server.MapPath("emails_names.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & MyPath
SQL = "INSERT INTO details (Name, Email) VALUES ('"&strFirst&"','"&strEmail&"')"
conn.Execute(SQL)
%>
and heres the error message:
"Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/flash_capture/project3/processForm.asp, line 21"
Line 21 is conn.Execute(SQL). I'm fairly new to asp so I apologise if the error is blindingly obvious.
Thanks