My ASP code runs without problem in my workstation. But when I run it on the server, the following error messages is displayed:
Here's the ASP code:
' This command triggers the error
Can anybody help me find the cause of the error?
TIA
Medic
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
Can anybody help me find the cause of the error?
TIA
Medic