Page 1 of 1

TUniDump specific transaction

Posted: Sun 28 Aug 2022 23:08
by ertank
Hello,

I am using UniDAC 8.3.2, Delphi 10.4.2, FirebirdSQL 4.0.1 32bit

By my application design, TUniConnection.DefaultTransaction assigned as a specific readonly transaction.

When I try to restore, TUniDump gives error saying "attempt to update during read-only transaction".

Is there a way to assign a separate transaction to TUniDump?
If not, is there any workaround I can use for this problem?

Thanks & Regards,
Ertan

Re: TUniDump specific transaction

Posted: Thu 15 Sep 2022 07:15
by pavelpd
Hi Ertan,
Thanks for your request!

The behavior you describe is considered normal.

As a workaround, you can use the TUniScript component and assign a separate transaction to it to execute the dump script.

For example:

Code: Select all

...
  UniQuery1.SQL.Text := 'select * from EMP;';
  UniQuery1.Open;
 
  UniDump1.TableNames := 'EMP';
  UniDump1.Backup;
  ...
  UniQuery1.Close;
  UniScript1.Transaction := UniTransaction1;
  UniScript1.SQL.Text := UniDump1.SQL.Text;
  UniScript1.Execute;
...

Also, you can leave your suggestion regarding adding the ability to assign a separate transaction to the TUniDump directive component at our user voice forum:
https://devart.uservoice.com/forums/104 ... components

If the suggestion gets a lot of votes, we will consider the possibility to implement it.