Subject Re: [firebird-support] Why does not apply insertion result.
Author Thomas Steinmaurer
Hello,

> I work two isql instance with one database. ((A isql instance) and (B isql intance) is connected with test.fdb.)
>
> A isql : Create table. (table name is "member")
>
> B isql : Can see the table.(SHOW SCHEMA "member") (I know that DDL is committed automatically.)

Not automatically in Firebird. Only if SET AUTODDL is set to ON.
Otherwise you have to commit DDL changes as well.

> A isql : Insert one record into the "member" table.
>
> B isql : Cannot find any data on "member" table.( I cannot find data because It does not commit on A isql. I think... )
> A isql : Run commit command.
>
> B isql : Cannot find any data on "member" table. (WHY??)

Because in isql a transaction is started in SNAPSHOT (repeatable read)
isolation mode per default. So if you run a COMMIT in session B and
re-run your query, then a new transaction is started behind the scene
and you will see the newly inserted record.

> B isql : Terminate and rerun instance. and connect to test.fdb. I can find date on "member" table.
>
> A isql : Insert another record into the "member" table. And run the commit command.
>
> B isql : Cannot find second data on "member" table. (WHY??)
> B isql : Run the commit command.
> B isql : Can find whole data on "member" table.

So, basically, get used to transactions and the available isolation
levels in Firebird.


--
With regards,

Thomas Steinmaurer
Upscene Productions
http://www.upscene.com
http://blog.upscene.com/thomas/

Download LogManager Series, FB TraceManager today!
Continuous Database Monitoring Solutions supporting
Firebird, InterBase, Advantage Database, MS SQL Server
and NexusDB!