Locking a whole Database on Server

Bart Pietercil bart.pietercil at gmail.com
Thu Mar 22 09:32:36 CDT 2007


On 22-mrt-07, at 14:25, Ruslan Zasukhin wrote:

> On 22/3/07 12:55 PM, "Stan Busk" <maxprog at mac.com> wrote:
>
> Hi Stan,
>
>> Is it possible to lock access to a whole database from Embedded
>> Server? I just want to allow first client to connect, if some
>> maintenance has to be performed lock access to all other clients
>> until the maintenance is done. I have seen that a lot of time in 4D.
>> I just need to be able to send a given error to all the other clients
>> trying to connect so they can wait until the lock is released. I can
>> then display a 'Maintenance on the way, please wait' dialog. Is it
>> possible with Valentina Embedded Server?
>
> No, but I think easy enough to implement, at least this EXCLUSIVE  
> lock.
> Please report it into Mantis.
>
> May be the same can be done to TABLE level:
>
> 1) API:
>
>    VDaatbase.Lock( kReadWrite )
>    VTable.Lock( kReadWrite )
>
>
> 2) SQL
>
>     "LOCK DATABASE db_name READWRITE"
>     "LOCK TABLE tbl_name READWRITE"
>
>

Since you were talking about Servoy :-)

One of its really good features is its ability to send messages to  
connected users and break connections.
This I think should be possible when implementing an exclusive lock  
(which most certainly would be most usefull,
cfr. my other post where the future sqlbuilder could be connecting to  
a VServer, obtain an exclusive lock and update the schema)
You need a polite way of signaling users to logout (and force them if  
they are not listening)

Bart


More information about the Valentina mailing list