Can I use the same structure of my components that already work with Firebird and also use with Postgres?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
soyjoy
Posts: 13
Joined: Fri 09 Oct 2015 13:41

Can I use the same structure of my components that already work with Firebird and also use with Postgres?

Post by soyjoy » Mon 23 Nov 2015 20:47

Hi,
My Firebird structure is as follows:
UniConnection [AutoCommit = False]> UniTransaction
UniQuery> UniTransaction

The application can either work with Firebird, as in PostGres, but when I run the query.execute get an error like this:
Can not perform operation on inactive transaction.
And that is so in the application:

Code: Select all

  try
    try
      UniQuery.Transaction := UniTransaction;
      UniTransaction.DefaultConnection := connPostgreSQL;
      UniTransaction.StartTransaction;
      UniQuery.Execute;
      ShowMessage('Ok');
    except
      on e: exception do
        mmErro.Lines.Add(e.Message);
    end;
  finally
    UniTransaction.Rollback;
  end;
Thanks very much for atention.

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Can I use the same structure of my components that already work with Firebird and also use with Postgres?

Post by azyk » Tue 24 Nov 2015 07:01

We have tried to reproduce the problem according to your recommendations, but it wasn't reproduced. Please compose a small test sample reproducing the problem and send it to andreyz*devart*com .

Post Reply