TUniDump specific transaction

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ertank
Posts: 172
Joined: Wed 13 Jan 2016 16:00

TUniDump specific transaction

Post by ertank » Sun 28 Aug 2022 23:08

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

pavelpd
Devart Team
Posts: 109
Joined: Thu 06 Jan 2022 14:16

Re: TUniDump specific transaction

Post by pavelpd » Thu 15 Sep 2022 07:15

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.

Post Reply