Page 1 of 1

TOraQuery.Connection Property

Posted: Mon 24 Sep 2012 11:58
by wittenburg
Hello,

we are switching from ADO to ODAC and i want to know what's the difference between TOraQuery.Connection and TOraQuery.Session property or rather if they are equal, so there is no disadvantage to use the Component like the following code:

Code: Select all

{$IFDEF ODAC}
  GlobalDataConnection: TOraSession;
{$ELSE}
  GlobalDataConnection: TADOConnection;
{$ENDIF}

Code: Select all

{$IFDEF ODAC}
  qryData := TORAQuery.Create(self);
{$ELSE}
  qryData := TADOQuery.Create(self);
{$ENDIF}
  qryData.Connection := GlobalDataConnection;

Re: TOraQuery.Connection Property

Posted: Mon 24 Sep 2012 13:18
by AlexP
hello,

The Connection and Session properties of TOraQuery are identical, and you can use any of them. The Connection property was added for compatibility when migrating from other components to ODAC. The code you provided will work correctly.