Subject Re: [firebird-support] FB, Delphi 7, IB components and transactions
Author Diego Barros
Hi again,

I was just looking at this and changed the transaction's AutoStopAction from saNone to saCommit. When I then run the two instances of the program, insert a record in one, and do a refresh in the other, I see the new record count. Are there any downsides to doing this? This seems, to me at least, to make things work more like SQL Server with ADO, for example and how it works as far as seeing changes by one instance as made by another. Again, I am a newbie, so please excuse any ignorance.

As an aside, I am not making calls to start, commit, and rollback transactions in my code as I am letting the Borland IB objects do the transactioning implicitly.

Regards,
Diego

On Thursday, January 13, 2005, at 10:43PM, Diego Barros <dbarros@...> wrote:

>
>Hi all,
>
>I am a newbie when it comes to transactions, so please excuse my ignorance when it comes to transactions.
>
>I am using FB 1.5.2, with Delphi 7 and the IB components. My question is, why when I insert a record into a table don't I see it in another running program?
>
>I have a small test application with a query which selects a count of records from a table. On a form I show this number when I click the Refresh button. I have another button which inserts a new record into the table. So my form has the following components:
>
>IBQuery1 - which does a SELECT COUNT(*) on the table
>IBQuery2 - which inserts a record
>IBDatabase - used by both queries
>IBTransaction - used by the IBQuery1, IBQuery2 and IBDatabase components
>
>When I click the Refresh button I execute the following code:
>
>IBQuery1.Close();
>IBQuery1.Open();
>
>When I click the Insert button I execute the following code:
>
>IBQuery2.ExecSQL;
>
>I then run two copies of this test program. I insert a record in one instance of the program, click refresh and I see the record count increase. I click Refresh on the other instance of the application and the count does not change.
>
>Can this behavior be changed? I changed the transaction component to be read-commited, but that did not change the behavior. Maybe this is all about a different mindset and how one works with IB/FB? Are there any articles which talk about this? Maybe I need to try other components which work differently from a programming point of view?
>
>Any help or tips would be greatly appreciated by the FB newbie.
>
>Regards,
>Diego
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>


Cheers,
Diego