Access Database Write Error...How Do I Fix It?

Results 1 to 2 of 2

Thread: Access Database Write Error...How Do I Fix It?

  1. #1
    Join Date
    Dec 1969

    Default Access Database Write Error...How Do I Fix It?

    I get a write error when I try to write to my database using ASP on my Windows 2000 system using IIS 5.0. Specifically, the error is: <BR><BR>ADODB.Recordset (0x800A0CB3) <BR>Object or provider is not capable of performing requested operation. <BR>/newpoll/pollresults.asp, line 25 <BR><BR>I have tried the Microsoft solution of setting the cursor location to adUseClient and it still doesn&#039;t work. This error only happens when I place my database file within my host directory...(i.e. any directory below C:Inetpubwwwroot). Whenever I don&#039;t put it in the host directory, I don&#039;t get this error (that is if I place the database file in a directory not below the host directory). How do I fix this? <BR><BR>Here is some sample code:<BR><BR>Here is the code that screws up when the database is located in the host directory and works when I place the database in a non host directory: <BR><BR>Dim objConn <BR>Set objConn = Server.CreateObject("ADODB.Connection") <BR>objConn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};" & _ <BR> "DBQ=C:Inetpubwwwroot
    ewpolldatabasespollresults.mdb" <BR> &#039;If I change the above database to My Documents and the corresponding DBQ to that directory...IT WORKS! <BR><BR>objConn.Open <BR>Dim strPollentry, objRS, iTotal <BR><BR>iTotal = 0 <BR><BR>&#039;Retrieve the results <BR>strPollentry = "" <BR>strPollentry = Request("pollentry") <BR><BR>&#039;Open the record <BR>Set objRS = Server.CreateObject("ADODB.Recordset") <BR>objRS.CursorLocation = adUseClient <BR>objRS.Open "pollresults", objConn <BR><BR>objRS.MoveFirst <BR><BR>&#039;Add the result if the cookie isn&#039;t set <BR>If Not (Request.Cookies("Voted") = "NBA") AND Not (strPollentry = "") Then <BR>Do While Not objRS.EOF <BR>If strPollentry = objRS("Name") OR objRS("Name") = "Total" Then <BR>&#039;This is line 25 <BR>objRS("Results") = objRS("Results") + 1 <BR><BR>blah...blah...blah <BR><BR>I think it has to do with permissions, but I can&#039;t figure out what to change. I did a search online for this error and other people couldn&#039;t figure it out either. Works when database is off server and not within the root directory. Seems odd...Please help!

  2. #2
    Join Date
    Dec 1969

    Default RE: Access Database Write Error...How Do I Fix It?

    I think there is a FAQ on this that should explain how to fix it.<BR><BR>Check the one that says "Operation must use an updateable query."<BR><BR>-Doug

Posting Permissions

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