Subject | Re: VB + Firebird Lock |
---|---|
Author | kevtey |
Post date | 2006-02-17T14:45:38Z |
--- In firebird-support@yahoogroups.com, "Adam" <s3057043@...> wrote:
im able to lock the record im still facing some major problem.
i use select * from i_agent where agent_id ='123' with lock; in my vb
application and when this query is till in open transaction i try to
run another vb application that will read from the same record and my
2nd vb application will hang! until the 1st vb application end the
transaction! this is no good for clients and server based application.
is there a way for me to prevent this error by happening? or is there
a way to check if any particular record is being lock? pls help me out
thank you
>thanx for all the reply..
> --- In firebird-support@yahoogroups.com, "kevtey" <kevtey@> wrote:
> >
> > hie im new in firebird. i would like to know how can i impliment
> > record locking in firebird? can anyone pls enlighten me pls...
> >
> > currently im accessing the firebird from vb using connectionstring and
> > recordset. i try using pesimistic lock but its not working...should i
> > use adodb connection begintrac?
> >
>
> You mention you are new to Firebird, I will not address you particular
> question as both Jason and Si have given you two ways of achieving
> this (see release notes for details on Si's method).
>
> I only warn that there are very few occasions in Firebird where a
> pessimistic lock is actually necessary. In Firebird, readers and
> writers do not block each other due to multi generational
> architecture. With some DBMS, it is necessary to block writers when
> totalling records etc, with Firebird, there is no need to. So my
> advice is to make sure you actually need to use pessimistic locking or
> you are giving your system an unnecessary scalability limitation.
>
> Adam
>
im able to lock the record im still facing some major problem.
i use select * from i_agent where agent_id ='123' with lock; in my vb
application and when this query is till in open transaction i try to
run another vb application that will read from the same record and my
2nd vb application will hang! until the 1st vb application end the
transaction! this is no good for clients and server based application.
is there a way for me to prevent this error by happening? or is there
a way to check if any particular record is being lock? pls help me out
thank you