R
riyaz
hi all,
i am just triying to post data to MS -access table from normal textarea in
asp page,
here is my code:
<%
Dim cn1,rs1,sql1
Dim sResult,sResult1,sResult2
Set cn1 = Server.CreateObject("ADODB.Connection")
Set rs1 = Server.CreateObject("ADODB.Recordset")
cn1.Provider = "MicroSoft.jet.OLEDB.4.0"
cn1.Open "C:\Inetpub\wwwroot\webap\test.mdb"
sResult=Request.Form("s1") //-- data from textarea1
sResult1=Request.Form("s2")//-- data from textarea2
sResult2=Request.Form("s3")//--data from textarea3
if Request.Form("Submit1")= "Submit" then
if c <> 1 then
sql1 = "insert into feb
Values('"&sResult&"','"&sResult1&"','"&sResult2&"')"
rs1.Open sql1,cn1,3,3//--line 82
else
end if
end if
%>
<%
if Request.Form("Submit1") = "Submit" then
if c <> 1 then
Response.Redirect "posted.htm"
end if
else
end if
%>
error is:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/webap/insert.asp, line 82
plz help me to modify my code
best regards
Niyaz
i am just triying to post data to MS -access table from normal textarea in
asp page,
here is my code:
<%
Dim cn1,rs1,sql1
Dim sResult,sResult1,sResult2
Set cn1 = Server.CreateObject("ADODB.Connection")
Set rs1 = Server.CreateObject("ADODB.Recordset")
cn1.Provider = "MicroSoft.jet.OLEDB.4.0"
cn1.Open "C:\Inetpub\wwwroot\webap\test.mdb"
sResult=Request.Form("s1") //-- data from textarea1
sResult1=Request.Form("s2")//-- data from textarea2
sResult2=Request.Form("s3")//--data from textarea3
if Request.Form("Submit1")= "Submit" then
if c <> 1 then
sql1 = "insert into feb
Values('"&sResult&"','"&sResult1&"','"&sResult2&"')"
rs1.Open sql1,cn1,3,3//--line 82
else
end if
end if
%>
<%
if Request.Form("Submit1") = "Submit" then
if c <> 1 then
Response.Redirect "posted.htm"
end if
else
end if
%>
error is:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/webap/insert.asp, line 82
plz help me to modify my code
best regards
Niyaz