Re: [sqlite] How to maintain EXCLUSIVE access to database continuously ?

2006-09-24 Thread RohitPatel9999

Thanks for alternative ideas.

In my app, user need Exclusive mode occassionally. But when uses Exclusive
mode, user may enter/import some data or may change permissions for other
users, or some report generation. User may use Exclusive mode for few
minutes to may be 1-2 hours. That time no other user should be able to
access the database. 

I tried to use extra file (non-database file, same filename) to maintain
exclusive access. When that extra file is present/locked, other user can not
access that database (company).

But I think, there must be some way/trick to maintain EXCLUSIVE access to
database continuously (need to COMMIT data in-between) ? i.e. to maintain
EXCLUSIVE access, and still commiting data in-between ? 

Rohit

-- 
View this message in context: 
http://www.nabble.com/How-to-maintain-EXCLUSIVE-access-to-database-continuously---tf2326092.html#a6479634
Sent from the SQLite mailing list archive at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] How to maintain EXCLUSIVE access to database continuously ?

2006-09-24 Thread Thomas . L
On Sun, 24 Sep 2006 04:41:55 -0700 (PDT), you wrote:

>User (Client App) connects to middle-tier application-server and then user
>may access any one company in normal or exclusive mode. Only
>application-server communicates with database. If user wants exclusive
>access, Application-Server needs to maintain that exclusive access to
>database for that user.

Hello 

I don't understand, how you get a real advantage, if you lock a
Database (in daily processing) exclusive... I think, that isn't really
necessary. But, if you want it nonetheless, then write and read a
Lock-State-Table.

I do it this way in my App. Every User do a Login in a specially Table
and also a Lockout, if endet his work. If an exclusive Mode wanted by
User, then write a adequate  Info to the Lockstate-Table. Then check,
that not another User has earlier rights. If this successful, the User
can work in exlusive mode, is not, kick him out ;-)

The real advantage by this way is, an Administrator is never blocked
by a silly User, who has forgotten to logout and is gone to weekend at
wednesday. 

My opinion is, never do a hard lock to a Database, except, it is done
by the Database himself.

Best Regards
Thomas

www.thlu.de

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] How to maintain EXCLUSIVE access to database continuously ?

2006-09-24 Thread AJ

use your chosen OS's reader/writer locks per user.




Some additional info

User (Client App) connects to middle-tier application-server and then user
may access any one company in normal or exclusive mode. Only
application-server communicates with database. If user wants exclusive
access, Application-Server needs to maintain that exclusive access to
database for that user.

Rohit
  


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] How to maintain EXCLUSIVE access to database continuously ?

2006-09-24 Thread RohitPatel9999

Some additional info

User (Client App) connects to middle-tier application-server and then user
may access any one company in normal or exclusive mode. Only
application-server communicates with database. If user wants exclusive
access, Application-Server needs to maintain that exclusive access to
database for that user.

Rohit
-- 
View this message in context: 
http://www.nabble.com/How-to-maintain-EXCLUSIVE-access-to-database-continuously---tf2326092.html#a6471388
Sent from the SQLite mailing list archive at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] How to maintain EXCLUSIVE access to database continuously ?

2006-09-24 Thread RohitPatel9999

Hi SQLite experts/users

In my multi-user app (Win32, SQLite3.3.4), one database file for each
company (accounts).  User can access company accounts in two modes, normal
mode and exclusive mode. In exclusive mode, only one user will have access,
no other user should be able to access that company database.

I know that BEGIN EXCLUSIVE allows such access. User may enter info even in
exclusive mode. 
But when user enters and saves some info, I need to COMMIT and again need to
issue BEGIN EXCLUSIVE (because I can't wait till last for commiting). Before
issuing BEGIN EXCLUSIVE again, in-between, if other user gets access to
database, then first user (with exclusive mode) will not be able to maintain
his/her exclusive access.

How to maintain EXCLUSIVE access to database continuously (need to COMMIT
data in-between) ?
i.e. is there any way to maintain EXCLUSIVE access, and still commiting data
in-between ?

Thanks for any guidance.

Rohit
-- 
View this message in context: 
http://www.nabble.com/How-to-maintain-EXCLUSIVE-access-to-database-continuously---tf2326092.html#a6471314
Sent from the SQLite mailing list archive at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-