Subject | Re: [IBO] Firebird 1.5 and Pessimistic Locking |
---|---|
Author | Jason Wharton |
Post date | 2003-10-17T21:51:06Z |
This fix will be in the next sub-release.
Thanks,
Jason Wharton
Thanks,
Jason Wharton
----- Original Message -----
From: "Marcel Brink" <mbrink@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, October 16, 2003 3:49 PM
Subject: [IBO] Firebird 1.5 and Pessimistic Locking
> Hi,
>
> For those who are interested in using the pessimistic Locking
> mechanism of Firebird 1.5 with IBO I found the following
> solution for not losing the "WITH LOCK" statement in a SELECT
> statement.
>
> I noticed a previous thread about this issue, but commenting
> lines of source in not a solution IMHO.
>
> When the following Method is changed everything works great,
> also with the "WITH LOCK" Statement.
>
> Package IBO40CRT.bpl Unit IB_Parse.
>
> procedure FindSQLForUpdate( const SQL: string; var BegPos, EndPos:
> longint );
>
> OLD Implementation :
>
> procedure FindSQLForUpdate( const SQL: string; var BegPos, EndPos:
> longint );
> var
> TermKeyWord: string;
> begin
> BegPos := ParseLineInvalid;
> EndPos := ParseLineEnd;
> ParseStr( SQL,
> 'FOR', false,
> [';'],
> BegPos, EndPos, TermKeyWord, false, false );
> end;
>
> NEW Implementation :
>
> Add "WITH" and "LOCK" to the TermKeys Array to pass in the
> ParseStr Method.
>
> procedure FindSQLForUpdate( const SQL: string; var BegPos, EndPos:
> longint );
> var
> TermKeyWord: string;
> begin
> BegPos := ParseLineInvalid;
> EndPos := ParseLineEnd;
> ParseStr( SQL,
> 'FOR', false,
> ['WITH', 'LOCK', ';'],
> BegPos, EndPos, TermKeyWord, false, false );
> end;
>
> Marcel Brink
> Xploration.