Jump to content
Sign in to follow this  
EugeneK

TFDConnection.ExecSQL with ResultSet

Recommended Posts

Hi


TFDConnection has following method

function ExecSQL(const ASQL: String; var AResultSet: TDataSet): LongInt;

 

When using this do I need to free returned AResultSet? And if yes then if exception will be raised when opening query does it mean that there will be memory leak of TFDQuery object?

Share this post


Link to post
5 hours ago, EugeneK said:

When using this do I need to free returned AResultSet?

 

That's correct the ExecSQL will create the TFDQuery object without an owner and you've to free (no matter if there was an exception or not).

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×