can no longer update- any ideas?

Results 1 to 3 of 3

Thread: can no longer update- any ideas?

  1. #1
    gr0x Guest

    Default can no longer update- any ideas?

    Hey all,<BR><BR>I recently decided to try out NTFS since it has better security for the web server etc etc.<BR><BR>However, now that I have gone to an NTFS file system, none of my update code is working. I am using access and a DSN-less connection. Here is an excerpt of some of my code:<BR><BR>my include connection file:<BR><BR>Dim objConn<BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR>Dim accessdb, myDSN<BR>accessdb="nhl2001.mdb"<BR>myDSN="DRIVER={ Microsoft Access Driver (*.mdb)};"<BR>myDSN=myDSN & "DBQ=" & server.mappath(accessdb)<BR>objConn.ConnectionStri ng = myDSN<BR>objConn.Open<BR><BR>dim objRS, myRS<BR><BR>&#039;open the user&#039;s profile and increment their number of posts.<BR>Set myRS = Server.Createobject("ADODB.Recordset")<BR>myRS.Ope n "profile", objConn, adOpenDynamic, adLockOptimistic, adCmdTable<BR><BR>dim found<BR>found = False<BR><BR>do while not (myRS.EOF OR found)<BR> if (StrComp(myRS("postid"), postid, vbTextCompare) = 0) then<BR> found = True<BR> else<BR> myRS.MoveNext<BR> end if<BR>Loop<BR><BR>if not found then<BR>&#039;close the database connection<BR>%&#062;<BR>&#060;!--#include file="dbclose.asp"--&#062;<BR>&#060;%<BR>&#039;tell them its not found, try again<BR>response.write("<BR><BR>&#060;center&#062 ;")<BR>response.write("&#060;a href=&#039;postmessage.asp&#039;&#062;")<BR>respon se.write("Something screwed up- try again dude.")<BR>response.write("&#060;/a&#062;")<BR>response.end<BR>else<BR>&#039;increme nt the number of posts<BR>dim numposts<BR>numposts = myRS("postnum") + 1<BR>&#039;put it back in the database<BR>myRS("postnum") = numposts<BR>myRS("lastpost") = dtop<BR>myRS.Update<BR>myRS.Close<BR>set myRS = nothing<BR><BR>this code worked fine on a fat32 file system. now, I get this:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers (0x80004005)<BR>[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.<BR><BR>I have other webs that are giving similar problems. Is there a way to fix this, or some NTFS security setting that is preventing me from updating the database?<BR><BR>Any help is greatly appreciated!<BR><BR>Thanks,<BR><BR>~g

  2. #2
    Markkk Guest

    Default RE: can no longer update- any ideas?

    Keep in mind that whenever Access is opened a locking file (*.ldb) must be created in the same directory as the Access datbase file (*.mdb). Appropriate NTFS permissions must be granted to allow the web user to CREATE the locking file and DELETE it.<BR><BR>The NTFS Account used by IIS must have permission to:<BR>1. CREATE the locking file (*.ldb)<BR>2. DELETE the locking file (*.ldb)<BR>3. MODIFY or CHANGE the locking file (*.ldb)<BR>4. MODIFY or CHANGE the database file (*.mdb)<BR><BR>If you are using Anonymous Authentication, the NTFS Account will be something like "IUSR_MachineName", or whatever you have setup as an Anonymous Account.<BR><BR>If you Authenticate your web users, then NTFS must set permissions for each authenticated web user.<BR><BR>i hope this helps.....

  3. #3
    gr0x Guest

    Default now i've done it..

    thanks for the tip- you were absolutely right. messing around in web server properties, i can now update as before- however, i can only do it through localhost and can not access my pages through http! <BR><BR>this is retarded. 5 more minutes and i&#039;m reinstalling IIS.

Posting Permissions

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