Subject Re: firebase15
Author Lester Caine
dleec45@... wrote:

>>My Thoughts - Don't use RowLock - It's an archaic way of working :)
>>Your fix looks fine - I would never have been through there, and would
>>prefer to avoid anything that breaks the generational processing that
>>Firebird has always provided.
> What I am doing is getting a new seed with a random generator using this:
> $db->RowLock('seed','seed',srand($rs->fields[0]) + intval(substr(microtime(),2,4)),'seed=seed');

The question has to be "Why?"
What are you trying to do, then perhaps we can direct you another way :)
If you need to guarantee something unique, then you would normally use a
generator, insert the blank record with the generator id, and then add
the details. But since you know that the id is unique, there is no need
to lock, just post the details.

>>The correct way of doing things is to
>>handle the error when a commit fails because a second user has already
>>updated the record. If you want to say that someone else is modifying a
>>record, then an 'UPDATING' field would be more appropriate - into which
>>you put the ID of the user who is 'locking' the record. Updating that
>>field would be equivalent of RowLock, and would tell you who is
>>processing the record - ready for when things get stuck ;)
> I'm afraid I do not know of any other way to do this as my experience with PHP and Firebird15 is very small. I'm just beginning to attempt this modification and the mountain is steep, cliff like actually!!! Any advise appreciated. Lee

I've pushed this back onto the firebird-php list as well. Other people
there may well come up with other useful ideas. And any help can be
useful ;)

Lester Caine
L.S.Caine Electronic Services