Subject Re: [firebird-support] Embedded Firebird : Transaction
Author Boris Herbinière-Sève
> How do you access the database?

Through a thin abstraction layer (multiple backends could be used).

> If you use a component like IBX you should have something like
> TIBTransaction. Simply call StartTransaction and later Commit/Rollback.
> Generally, "set transaction" is correct. This works with ISQL and
> IBExpert. IBConsole OTOH doesn't like that statement, perhaps because it
> implicitly starts transaction whenever something is executed.

I was looking for the SQL syntax, not API calls (similar to BEGIN/COMMIT
in Oracle, SQL Server, MySQL, ...).

Alternatively, is there a way to enable write caching (what I'm
basically trying to achieve, is faster bulk insert), through
CachedUpdates or RequestLive ?

Also, I ran into a problem when creating indexes.
> CREATE INDEX myindex ON LOGS (Id, Timekey);

Id is primary key, and timekey is a unique integer. When inserting, I
get no errors so I think there's no duplicate. However, when creating
the index, I get :

** IBPP::SQLException ***
Context: Statement::Execute( CREATE INDEX myindex2 ON LOGS (Id, Timekey) )
Message: isc_dsql_execute2 failed

SQL Message : -607
This operation is not defined for system tables.

Engine Code : 335544351
Engine Message :
unsuccessful metadata update
STORE RDB$INDICES failed
attempt to store duplicate value (visible to active transactions) in
unique index "RDB$INDEX_5"

Any ideas ?

--
Boris Herbinière-Sève