 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Jan Doggen Guest
|
Posted: Fri Sep 10, 2004 11:37 am Post subject: Stuck in transactions! |
|
|
Hi
Problem: 'cannot create new transaction because capacity is exceeded'
but CloseDataSets before StartTransaction is not an option.
This is the code:
- QryLookup (simple SELECT) is opened.
- WHILE NOT QryLookup.EOF
Put SQL with data from QryLookup into QryUpdate
(CloseDataSets)
StartTransaction
try
QryUpdate.ExecSQL;
commit
except
rollback
error message
end;
If I put CloseDataSets before the StartTransaction QryLookup gets closed
In *this* specific example I can bring CloseDataSets/StartTransAction
outside of the WHILE
loop (this changes the granularity of the transactions though).
But this is not always an option, because this looping/updating happens in a
lot of places,
e.g. with ClientDataSets showing data in a grid. I cannot always afford to
'close all datasets'.
Extra info:
- Delphi 7.1, DBExpress
- TSQLConnection to MSSQL Server 7, KeepConnection=TRUE, Multiple
Transaction=TRUE
- TSQLQueries have GetMetaData=FALSE
- MDAC 2.8
- Up to this point, no ClientDataSets were opened
- QryLookup and QryUpdate access the same database table
I'm getting pretty desperate here ;-(
Any suggestions as to what else I can try? Much appreciated!
Thanks
Jan
--
---------------------------------------------------------------------------
Jan Doggen, QSA Landsmeer, The Netherlands
Please remove the spam blocker from my email address when replying directly
|
|
| Back to top |
|
 |
Jan Doggen Guest
|
Posted: Wed Sep 15, 2004 7:49 am Post subject: Re: Stuck in transactions! |
|
|
I have now transferred all TQueries used for updating to an identical
TSQLConnection (name SCCConfigUpdate). All loookup queries go through the
'old' connection. Therefore no read-only unidirectional queries are
connected through SCCConfigUpdate and I can use transactions without the
CloseDataSet 'fix'.
Jan
"Jan Doggen" <j.doggen (AT) BLOCKqsa (DOT) nl> wrote
| Quote: | Hi
Problem: 'cannot create new transaction because capacity is exceeded'
but CloseDataSets before StartTransaction is not an option.
This is the code:
- QryLookup (simple SELECT) is opened.
- WHILE NOT QryLookup.EOF
Put SQL with data from QryLookup into QryUpdate
(CloseDataSets)
StartTransaction
try
QryUpdate.ExecSQL;
commit
except
rollback
error message
end;
If I put CloseDataSets before the StartTransaction QryLookup gets closed
In *this* specific example I can bring CloseDataSets/StartTransAction
outside of the WHILE
loop (this changes the granularity of the transactions though).
But this is not always an option, because this looping/updating happens in
a
lot of places,
e.g. with ClientDataSets showing data in a grid. I cannot always afford to
'close all datasets'.
Extra info:
- Delphi 7.1, DBExpress
- TSQLConnection to MSSQL Server 7, KeepConnection=TRUE, Multiple
Transaction=TRUE
- TSQLQueries have GetMetaData=FALSE
- MDAC 2.8
- Up to this point, no ClientDataSets were opened
- QryLookup and QryUpdate access the same database table
I'm getting pretty desperate here ;-(
Any suggestions as to what else I can try? Much appreciated!
Thanks
Jan
--
--------------------------------------------------------------------------
-
Jan Doggen, QSA Landsmeer, The Netherlands
Please remove the spam blocker from my email address when replying
directly
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|