Subject isc_prepare_transaction 2PC
Author accesosecuencial
I've been using firebird for the last 6 years in every
developement I make with great success. Thanks guys!.

I am considering developing a distributes application using
Firebird and MsSQL in C#. For Firebird I use de Firebird ADO.NET data
providers I downloaded fron Firebird web page.

I am considering the following scenario

start a transaction
insert a reccord in Firebird Database
insert a record in MsSQL Database

I have to do this using a two-phase commit (2PC) to keep integrity
in both databases (Firebird and MSSql). How con I implement 2PC from
the firebird side in this scenario?

Reading Firebird documentation I found the isc_prepare_transaction
but I have no way of calling it from C#.
I wanted to be able to do the following

Start FB Transaction (1)
Start MsSQL Transaction (2)
insert a reccord in FB Database //Rollback (1) and (2) if fails
insert a record in MsSQL Database //Rollback (1) and (2) if fails
Prepare FB Transaction //Rollback (1) and (2) if fails
Prepare MsSQL Transaction //Rollback (1) and (2) if fails
Commit FB Transaction
Commit MSsSQL transaction

I want to be able to do this manualy like the example, I am not
looking for a transparent way of doing this,

Thanks in advance

Lic Esteban Calabria