Subject Re: [ib-support] Re: Exclusive Lock
Author Guillermo Najar-Arreola
Hi,
I'm using Delphi 6 UP2 with dbExpress; is there any way to do this without
calling the API ? any Delphi function or procedure to manage this
transaction locking ?

Guillermo

""nitaligavino"" <Dan.Crea@...> escribi� en el mensaje
news:ancd62+juiq@......
> --- In ib-support@y..., "Dimitry Sibiryakov" <SD@t...> wrote:
> > On 30 Sep 2002 at 19:32, Guillermo Najar-Arreola wrote:
> >=20
> > >multiuser acces. How can I achieve this exlusive-lock in Firebird=20
> for
> > >a table? I'd like not doing it from my application using flags that
> >=20
> > You can play with transaction's parameters (such as=20
> tpb_exclusive,=20
> > tpb_lock_read, tpb_lock_write). But don't ask me - how. I don't=20
> know.
> >=20
> > SY, Dimitry Sibiryakov.
>
> If you are using the API calls then you can acquire an exclusive=20
> table lock during transaction creation. Here is an example of how to=20
> setup the char vector: (C / C++)
>
> static char trans_locked[] =3D
> {
> /**Interbase version.*/
> isc_tpb_version3,
> /**Access mode.*/
> isc_tpb_write,
> /**Isolation level.*/
> isc_tpb_concurrency,
> /**Lock resolution.*/
> isc_tpb_nowait,
> /**Table reservation.*/
> isc_tpb_lock_write,
> `T',
> `a',
> `b',
> `l',
> `e',
> isc_tpb_protected, // End table
> /**Terminator.*/
> '\0',
> };
>
> Here a tpb is created for an exclusive write lock on the table=20
> named "Table".
>
> After building up this tpb you can then pass it to:
> isc_start_transaction(=85)
>
> Note that the size is:
> int iSize =3D sizeof(trans_locked) =96 1);
> We don't consider the terminator.
>
> I hope this is still accurate, it's been about a year since I looked=20
> at this!
> You can also look at the API Guide under the section:
> "Specifying table reservation"
>
> However, if I remember correctly the examples in the documentation=20
> don't seem to work correctly.
>
> Hope this helps.
> Dan
>
>
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
> =20
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/=20
>
>
>