Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

...error '80004005'...Cannot update the cursor. 1

Status
Not open for further replies.

medic

Programmer
Jun 14, 2000
459
US
My ASP code runs without problem in my workstation. But when I run it on the server, the following error messages is displayed:
Code:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Visual FoxPro Driver]Cannot update the cursor.

Here's the ASP code:
Code:
Dim connStr
Dim oConn

connStr = "Driver=Microsoft Visual FoxPro Driver; " + _
          "SourceType=DBF;SourceDB="+ Server.MapPath(".") + _
          ";BackgroundFetch=No;"

Set oConn = Server.CreateObject("ADODB.connection")
    
oConn.Mode = 3 ' Read/Write
oConn.Open (connStr)

Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")

rs.cursortype = 2         'adOpenDynamic 
rs.cursorlocation = 2     'adUseServer
rs.locktype = 3           'adLockOptimistic
rs.Open "select * from CHECKS", oConn

Dim NewID
if rs.EOF then
  NewID = 1
else
  rs.MoveLast
  NewID = Cint(rs("ID")) + 1
end if

rs.AddNew
rs("ID") = NewID
rs("FileName") = filename
rs("ImgData").AppendChunk imgdata
rs("ContType") = contenttype
rs.Update
' This command triggers the error


Can anybody help me find the cause of the error?

TIA

Medic
 
Check the permissions on the database file and the folder.

Whenever a update or insert query is run
against the file based(like MS Access OR Foxfor database) a temporary file is created and then destroyed right after the transaction is done.Check that you have allowed every one the desired permissions.

[peace]
 
Thanks adroit.
It's working now.

Medic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top