StartTransaction & FetchAll=False

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Migalka
Posts: 1
Joined: Fri 04 Feb 2005 10:41

StartTransaction & FetchAll=False

Post by Migalka » Fri 04 Feb 2005 11:14

Hi.
I try .StartTransaction then some queries may .FetchAll in False. And get exception (translate from russian): "Can't create new transaction couse over limit capacity". Help says me that
"Note: In some cases TCustomDADataSet.FetchAll may conflict with transaction control (EOLEDBError 'Cannot create new connection because in manual or distributed transaction mode.') or may cause deadlocking on Post on editing queries with ORDER BY clause." This is declaration, but I need solve this problem. I can't run another connection and I need transaction. Is it possible? What "some cases" and what "another cases" which not conflict with transaction control?

ps Sorry for my english.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 04 Feb 2005 14:14

In practice, transactions and FetchAll = False are incompatible. The only exception if you open DataSet with FetchAll = False, perform fetch completely and only then started calling StartTransaction or Edit..Post. Unlikely, this solution will suit you.

ingel
Posts: 2
Joined: Thu 27 Jul 2006 16:08

the same problem/error message ..

Post by ingel » Thu 27 Jul 2006 16:18

Hi , I have the same error message , when I open one Msquery (select UNION other select) .. but in ALL components MSQuery the property FetchAll = TRUE ..
I'm using Delphi7 and SDAC 3_55_0_16 del 05-07-2005 version .
with SQL2000 sp3.

I'm doing :

(here InTransaction is false)
-startransaction
try
- open query (first instruction) (ERROR ...)
- comitt
except
- rollback
end

Thanks , sorry fo my english

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 28 Jul 2006 07:02

> Hi , I have the same error message ...
We couldn't reproduce the problem.
Please send us (evgeniyD*crlab*com) a complete small sample to demonstrate it, including script to create and fill table.

> I'm doing :
If you mean under "open query " only SELECT statement execution, working with transactions is not necessary.

ingel
Posts: 2
Joined: Thu 27 Jul 2006 16:08

I found the error ...

Post by ingel » Fri 28 Jul 2006 13:52

Hi .. the problem was in a MSQuery component .. by error , the property
query1.sql.text have the following text :

select c.codigo_cuenta,c.descripcion from Datos b, cuentas_contables2 c
where c.codigo_cuenta = b.cuenta_acreedores_varios
select c.codigo_cuenta,c.descripcion from Datos b, cuentas_contables2 c
where c.codigo_cuenta = b.cuenta_acreedores_varios

TWO select ! .. Someone forgot do MSQUERY1.SQL.CLEAR

MSquery1.OPEN NO report error .. after this open I begin a new transaction ...

startransaction OK

try
Msquery2.open ERROR !! (select1 UNION select2)
ExecProc (Storeprocedure where I Save data)
commit
except
rollback
end

I ADD Query1.sql.clear .. and ALL work OK !
(Perhaps the component should be test the sql.text property )

With best regards
Pablo

Post Reply