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!

Writing/Updating Errors with dbf tables in Win NT IIS

Status
Not open for further replies.

pengprog

Programmer
Jul 16, 2002
25
US
Hello,
I am trying to make an ASP application and need to be able to not only read, but also Write/Update to my Dbase tables. They are Dbase 5 and I am using VB Script. I use to test my application on Win XP and everything went fine with reading and writing, now I changed everything to Windoes NT and everytime there is a place where I need to write or update a record, I get an error message that says:

[Microsoft][ODBC dBase Driver] The database engine could not lock table 'table#dbf' because it is already in use by another person or process.

I checked all the connections or my table and users who could possibly be connected to my table but NONE are! Help please!!!
 
Hi ...
Do you have write permission on the directory wich your DBF file is in it ?
----
TNX.
E.T.
 
yeah I do. I can't seem to figure out why everything is working on my Win XP version of IIS and not working on Win NT IIS
 
Hi ...
And what is your connection string ?
----
TNX.
E.T.
 
sql = "SELECT * FROM BEMIMA WHERE UNAME = '" & Session("USERNAME") & "' AND MIMA = '" & Session("PASSWORD") & "'"
 
Hi ...
I did'nt mean your SQL command.
I want to know your CONNECTION STRING.
the connection string of your Connection Object.
and also what is the version of your MDAC ?
maybe you have to update it.
you can download MDAC 2.7 and 2.8 from microsoft site.
----
TNX.
E.T.
 
I got rid of my previoud error and my new error is

Microsoft Cursor Engine error '80004005'
Insufficient base table information for updating or refreshing.

I then downloaded MDAC 2.7 and it did not help.

I am hosting my ASP, VBScript Files on an NT Server and querying Dbase 5 tables.

Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString="Driver={Microsoft dBASE Driver (*.dbf)};" & _
"Dbq=" & DBLocation
objConn.Open

The DBlocation is just a absolut path name to the folder that contains my Dbase tables...

Also..
Here is a bit more of the code. It works fine when running in WinXP...

Set RS = Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM BEMIMA.DBF WHERE UNAME = '" & Session("USERNAME") & "' AND PW = '" & Session("PASSWORD") & "'"
RS.CursorLocation = adUseClient
RS.Open sql, objConn,adOpenStatic,adLockOptimistic

If not RS.EOF then
'update the record

RS("PW") = new_pass
RS.Update ' This is where i get the error
Session("password") = new_pass


Thanks for all your patience and help...I really thought it would work after installing the MDAC 2.7, is there a chance i did it wrong...I have SQL Server 7 on NT Machine....
 
Hi ...
I still can't understand the error.
but here are some points.
1- have you installed the latest version of Service Pack on your windows NT ?
2- try using server-side cursor.
----
TNX.
E.T.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top