ASP & Access (updateable query)

Results 1 to 3 of 3

Thread: ASP & Access (updateable query)

  1. #1
    kishore Guest

    Default ASP & Access (updateable query)

    hello Everybody,<BR> Though I am not new to ASP , but very new for ASP and Access.I am use to Oracle Database. Now I started using on Access and it is giving me lot of probs.Here is example<BR>&#060;%<BR>option explicit<BR>dim cn,rs,str,messno,parmessno,username,message,subjec t,today,x<BR>Const adExecuteNoRecords = &H00000080<BR>set cn = Server.CreateObject("adodb.connection")<BR>set rs = Server.CreateObject("adodb.recordset")<BR>cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &<BR>Server.MapPath("mydata.mdb") & ";"<BR>set rs= cn.Execute("select max(messagenumber) from discuss_data")<BR>messno=Cint(rs(0))+1<BR>rs.Close <BR>username="&#039;" & Request.Form("txtusername") & "&#039;"<BR>subject= "&#039;" & Request.Form("txtsubject")& "&#039;"<BR>message="&#039;" & Request.Form("txtmessage") & "&#039;"<BR>parmessno=Request.Form("txtparentMessa ge")<BR>today= "&#039;" & Now() & "&#039;"<BR>str ="INSERT INTO discuss_data messagenumber,UserName,Subject,Message,MessageDate ,ParentMessag<BR>e)" _ <BR>& " values (" & messno & "," & username & "," & subject & "," & message &<BR>"," & today & "," _ <BR>& parmessno & ")"<BR>Response.Write str<BR>cn.Execute str,x,adExecuteNoRecords<BR>cn.Close<BR>&#039;Resp onse.Redirect "discuss.asp"<BR>%&#062;<BR><BR>user feed data and then he is redirected to this page for insertrion, here I error saying<BR>Error Type:<BR>Microsoft JET Database Engine (0x80004005)<BR>Operation must use an updateable query.<BR>/myproj/discussform/DiscussSave.asp, line 20<BR> I don&#039;t know what is wrong.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP & Access (updateable query)

    The problem is not with ur code.. it is totally depends on permissions given to ur database..<BR>The simple way to avoid this error is to change the permission of full control to every one default it is set full control to Authenticated users.<BR>you have to set the same permission to every one. thats all..<BR>all the best..<BR>for this..if the server with u, u can directly open the properties of ur mdb and in securities every one..and check full control check box..ok..<BR>or ur site is hosted with some other company..ask him to give permissions to ur database..i.e. full control to every one..<BR>ok..incase of any doubt..i&#039;ll give u reply on monday..<BR>all the best..

  3. #3
    Kishore Guest

    Default Thanks A Lot Probs Solved

    Once agian Thanks, I gave Permission To Internet Guest Account Full Control of the Dir where .mdb file is present.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts