Subject | Re: [IBO] Re: Database file size increases heavily |
---|---|
Author | Arno Garrels |
Post date | 2002-12-03T18:21:28Z |
Marco,
Nevertheless I gave a transaction placed on the datamodule a try as well,
but...
begin
BeginBusy( false );
try
if Active then
CheckBrowseMode;
with InternalDataset do
if CheckConnection( true ) then
ExecuteImmediate( 'DELETE FROM ' + TableName, nil );
if Active then
begin
InternalRefresh;
First;
end;
finally
EndBusy;
end;
end;
procedures, but that's another task may be I'll care about next year.
Even if InTransaction is already true?
quasi exclusively, my GUI clients have access to other tables.
That 1 minute loop is the poll cycle of its job scheduler.
Now I'm thinking about using kbMemtable for that task that blows up the
database so quickly.
Thanks again
Arno Garrels
> compoent, or you are using <default> value in IB_Transaction property?I'm a lazy guy so I used default transactions.
Nevertheless I gave a transaction placed on the datamodule a try as well,
but...
> Well, don't to "second try".I agree, it was just another helpless attempt.
> Never used .EmptyTable, I should check the source to know what itprocedure TIBOBaseTable.EmptyTable;
> does. In any case, I would have choose from this two possibilities:
> a) use a TIB_DSQL with a "delete from mymastertable".
begin
BeginBusy( false );
try
if Active then
CheckBrowseMode;
with InternalDataset do
if CheckConnection( true ) then
ExecuteImmediate( 'DELETE FROM ' + TableName, nil );
if Active then
begin
InternalRefresh;
First;
end;
finally
EndBusy;
end;
end;
> b) create a stored procedure in the server that deletes the tablesYou are right, generally I should move plenty of db-work into stored
procedures, but that's another task may be I'll care about next year.
> I think that the right sequence is Commit and then close,I was not sure, so I tried the other way around as well but..
> > Mastertbl.First;Didn't know that.
>
> The above line starts a transaction!
Even if InTransaction is already true?
> I assume you can't do this loop inside ofYes, and it is not the only reason.
> a Stored Procedure because you need Zip_Encrypt(), right?
> In the meanwhile, is some other client starting another "1 minuteNo, the tables we are talking about are accessed by my server-service-app.
> loop" against the same tables?
quasi exclusively, my GUI clients have access to other tables.
> Mmmm... is it just only client application doing this? What tables areIt's a client/server app. for distributing files per FTP/SMTP automatically.
> other client affecting? Reading/writing? Or your is a single user
> situation? And what's the 1 minute cycle?
That 1 minute loop is the poll cycle of its job scheduler.
Now I'm thinking about using kbMemtable for that task that blows up the
database so quickly.
Thanks again
Arno Garrels