> That said, I'm not sure if DbLinq supports System.Transactions.  I
> suspect it doesn't (though it will (eventually?) use DB transactions,
> which may themselves support System.Transactions.

I tested TransactiondScope().
Test wraps SubmitChanges() calls into single transaction to insert 2 rows to 
different tables and running some queries between inserts.
Test fails since server returns error. Probably wrong COMMIT PREPARED and/or
COMMIT commands are sent to server.

Statements sent to server and server responses are:

PREPARE TRANSACTION '9b0087c3-8276-47a1-b2dd-2587ad66bf97'
unlisten *
select 1
BEGIN; SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
BEGIN; SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
   WARNING:  there is already a transaction in progress
INSERT INTO omdok (orderinr, arvekonto, kuupaev, viitenr, oper, opliik,
klient, dokumnr, kinkuup, "timestamp", akytus1, akytus2, algus, alusdok,
arvenumber, cmr1, cmr1tag, cmr2, cmr2tag, cmr3, cmr3tag, doksumma, guid,
hkytus1, hkytus2, kaal, kasutaja, kell1, kell2, kontonr, ksuund, kulud,
kurss, lopp, maksebkood, maksetin, masin, objekt, pais2obj, pais3obj,
pais4obj, pais5obj, pais6obj, pais7obj, pais8obj, pais9obj, parv, raha,
saaja, seisuparv, spid1, spid2, talonge, talv, tasukuup, tegmasin, tekst1,
tir1, tir1tag, tir2, tir2tag, tir3, tir3tag, username, valisreis, vant,
vmnr, yksus) VALUES (((NULL)), ((NULL)), ((E'2009-09-16 00:00:00.000000')),
((NULL)), ((NULL)), ((NULL)), ((NULL)), nextval('omdok_dokumnr_seq'),
((NULL)), ((E'20090416210424')), ((NULL)), ((NULL)), ((NULL)), ((NULL)),
((NULL)), ((NULL)), ((FALSE)), ((NULL)), ((FALSE)), ((NULL)), ((FALSE)),
((NULL)), ((E'FA458E6C-0BEE-495B-8CFE-E5EFE104F162')), ((NULL)), ((NULL)),
((NULL)), ((E'ADMIN')), ((NULL)), ((NULL)), ((NULL)), ((E'M')), ((NULL)),
((NULL)), ((NULL)), ((NULL)), ((NULL)), ((NULL)), ((NULL)), ((NULL)),
((NULL)), ((NULL)), ((NULL)), ((NULL)), ((NULL)), ((NULL)), ((NULL)),
((NULL)), ((NULL)), ((NULL)), ((NULL)), ((NULL)), ((NULL)), ((NULL)),
((FALSE)), ((NULL)), ((NULL)), ((NULL)), ((NULL)), ((FALSE)), ((NULL)),
((FALSE)), ((NULL)), ((FALSE)), ((E'ADMIN')), ((FALSE)), ((NULL)), ((NULL)),
((NULL)))

SELECT currval('omdok_dokumnr_seq')
COMMIT
PREPARE TRANSACTION '80b86ad7-1fd3-46eb-b606-aa736f2fc4c9'
     WARNING:  there is no transaction in progress
unlisten *
select 1
BEGIN; SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
BEGIN; SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
                WARNING:  there is already a transaction in progress
COMMIT
PREPARE TRANSACTION '59ff3eb9-8354-4d26-b3f8-5cff250c11fd'
   WARNING:  there is no transaction in progress
unlisten *
select 1
COMMIT PREPARED '9b0087c3-8276-47a1-b2dd-2587ad66bf97'
SET SEARCH_PATH=firma1,public
show escape_string_warning
SELECT kuupaev
 FROM omdok
 WHERE (dokumnr = ((9497))) LIMIT 2
unlisten *
unlisten *
select 1
COMMIT PREPARED '80b86ad7-1fd3-46eb-b606-aa736f2fc4c9'
ERROR:  prepared transaction with identifier
"80b86ad7-1fd3-46eb-b606-aa736f2fc4c9" does not exist

TransactionScope() requires non-default setting of config parameter in
PostgreSql and more server resources (uncommitted transactions are written
to disk).
So using it to wrap series of SubmitChanges() into single transaction is
probably not reasonable even if it works.

Andrus. 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to