locking error in multiuser database

icedtea97
04-13-2004, 09:06 AM
hello everybody,
i have a share database problem between one server and one client
(cross cable connection)
my connection is like this:

'client connection
MYDatabase = Server_path & "\" & "my" & Format$(Now(), "ddmmyyyy") & ".mdb"
'my_cn.CursorLocation = adUseServer
my_cn.Provider = "Microsoft.Jet.OLEDB.4.0"
my_cn.Mode = adModeShareDenyNone 'this is what i added
my_cn.Open MYDatabase, Admins

'server connection
OWNMYDatabase = App.Path & "\" & "my" & Format$(Now(), "ddmmyyyy") & ".mdb"
'own_my_cn.CursorLocation = adUseServer
own_my_cn.Provider = "Microsoft.Jet.OLEDB.4.0"
own_my_cn.Mode = adModeShareDenyNone 'this is what i added
own_my_cn.Open OWNMYDatabase, Admins




i have refer to the MSDN and what i found is by changing the MODE, i
should be able to share my database among two applicatio. but this is
wrong cause after i implement, i get this message:

'client PC get this message
Error Opening
The database has been placed in a state by user 'Admin' on machine
'WIN'. that prevents it from being opened or locked.
'WIN is my server PC


i shouldn't get this error after implement the "adModeShareDenyNone",right
Why i still get this error?

i close my connection and set my_cn = Nothing after i have update record.

i think most properly is there was a time where both client and server
open/edit database at the same time. that is something can not be
prevent.
Access should be able to handle this kind of thing.

i even try try on the ACCESS->Tools->security->User and group Permissions...
i add new group name according to my network workgroup's name.
i try other method and trying for few weeks already. still can not.

can someone tell me how to solve this problem????i can provide you
information about my application, if this is not enough.

i'm in big trouble.......
icedtea97

00100b
04-13-2004, 09:15 AM
A place to start would be to back out the Mode property setting and change the CursorLocation to adUseClient. Access MDB files do not support server-side cursors since the database engine is not a server engine but a shared-file engine.

icedtea97
04-15-2004, 12:42 AM
A place to start would be to back out the Mode property setting and change the CursorLocation to adUseClient. Access MDB files do not support server-side cursors since the database engine is not a server engine but a shared-file engine.
It still doesn't solve my problem, perhaps u can take a look on my sample and correct me. This will give u a clearer picture. I have updated a few times on the programme but the Client/Server worked without any link between the two database. Only recently I need to link the Client to Server, when all these error comes out.

The problem is the whole system crashed after around 6 thousands of records was inserted to the databese. The number was total records from Client and Server. Record was updated continously from both Client and Server at the same time. The process was smooth until the total records reach around 6 thousand.

Error message stated that the database cannot be update. Currently lock.
I tried Optimistic Lock into the programme but still not seeing any different.

My project was built on a concept where 2 PC can updates data at the same time. Both needs to insert into the same database. To start the data entry, Server will first insert the 1st record before Client. Then, data entry from the 2 PC continues without stopping until all record of the day was entered.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum