that old updatable query chestnut

Results 1 to 2 of 2

Thread: that old updatable query chestnut

  1. #1
    Join Date
    Dec 1969

    Default that old updatable query chestnut

    When I run this code I get the error:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80004005&#039; <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. <BR><BR>-----------------------<BR><BR>This is my code: <BR><BR>&#060;%<BR>If Session("g6ffwy") = False Then Response.Redirect("login.asp")<BR>%&#062;<BR>&#060 ;!--#INCLUDE file="inc/function.asp" --&#062;<BR>&#060;!--#INCLUDE file="inc/" --&#062;<BR>&#060;%<BR>recTitle = newstr(request("recTitle"))<BR>recName = newstr(request("recName"))<BR>Strmsg = server.htmlencode(Request.Form("recBody"))<BR>Strm sg = Replace(Strmsg, "&amp;", "&" ) <BR>Strmsg = chkString(Strmsg)<BR><BR>if recTitle &#060;&#062;"" then<BR>innitSQL = "INSERT INTO rec (recTitle, recName, recBody) VALUES (&#039;"&recTitle&"&#039;,&#039;"&recName&"&#039;, &#039;"&Strmsg&"&#039;)"<BR>set innitRS = oConn.Execute(innitSQL)<BR><BR>oConn.Close:set oConn=nothing<BR><BR>end if<BR><BR>response.redirect("index.asp")<BR>%&#062 ;<BR><BR>and this is the contents:<BR><BR>Dim oConn<BR>Set oConn = Server.CreateObject("ADODB.Connection")<BR>oConn.M ode = 3 &#039;3 = adModeReadWrite<BR>oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=D:webspacewwwserver1jimpixsearchjimpixsearch.c o.ukwwwjimpix oolsplugplug.mdb")<BR><BR>----------------------------<BR><BR>I have read and looked at all the issues there including deleting the database and uploading it again. <BR><BR>I have searched this messageboard a lot...<BR><BR>The code runs fine on IIS on my PC - the folder has Internet Guest User permissions setup. <BR><BR>But it falls down on the ASP hosts server when I try to run the insert SQL above. Am I meant to edit the read/write permissions remotely on the server? Would I get in touch with the host about that?<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default I doubt seriously...

    ...that your code *REALLY* looks like that when you run it on the Hosting service:<BR><BR>DBQ=D:webspacewwwserver1jimpixsear oolsplugplug.mdb<BR><BR>Presumably and hopefully, you are using Server.MapPath and a *RELATIVE* path to get to where the DB is on the host server.<BR><BR>Anyway, most hosting services require that you put your DBs into a *special directory*. Because they typically do *NOT* allow write access to any directory that holds HTML or ASP files.<BR><BR>So maybe you need to ask the hosting service *where* that directory is?<BR><BR>

Posting Permissions

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