After Update to 8.4.1. Query creates additional connection

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
bursch
Posts: 20
Joined: Tue 25 Sep 2018 07:45

After Update to 8.4.1. Query creates additional connection

Post by bursch » Tue 09 Mar 2021 14:03

Hi,

after upgrading to version 8.4.1 a simple console application creates multiple connections to postgres,

Code: Select all

	Con := TUniConnection.Create(nil);
	Con.Database := 'xxxx';
	Con.Username := 'xxxx';
	Con.Password := 'xxxx';
	Con.Options.EnableBCD := True;
	Con.Options.EnableFMTBCD := True;
	Con.ProviderName := TPostgreSQLUniProvider.GetProviderName();
	Con.SpecificOptions.Values['ProtocolVersion'] := 'pv30';
	Con.SpecificOptions.Values['MultipleConnections'] := 'False';
	Con.SpecificOptions.Values['UseUnicode'] := 'True';
	Con.SpecificOptions.Values['CharSet'] := 'UTF8';
	Con.SpecificOptions.Values['Schema'] := 'xxxx';
	Con.SpecificOptions.Values['ApplicationName'] := 'foobar';
	Con.Connect;

	Query := TUniQuery.Create(nil);
	try
		Query.Connection := Con;
		Query.SQL.Text := 'SELECT SAK_KONTO, SAK_DATUMAB FROM AGF_SAK ORDER BY SAK_KONTO, SAK_DATUMAB';
		Query.Open;
	finally
		Query.Free();
	end;

	Con.Free();
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
Look at

Code: Select all

TPgSQLRecordSet.GetExtFieldsInfo;

Code: Select all

TPgSQLCommand(RecordSet.GetCommand).FForceSwapConnection := True;
This connection is not needed and stays active until the query component is closed.

oleg0k
Devart Team
Posts: 190
Joined: Wed 11 Mar 2020 08:28

Re: After Update to 8.4.1. Query creates additional connection

Post by oleg0k » Wed 17 Mar 2021 08:03

Hello,
Thank you for the information. We will investigate this behaviour. We will inform you when we have any results.

wbr, Oleg
Devart Team

Post Reply