Normal Topic Fundamental question about XResult sets (Read 484 times)
Rod Weston
Member
*
Offline



Posts: 25
Joined: Aug 22nd, 2016
Fundamental question about XResult sets
Sep 22nd, 2016 at 2:58pm
Print Post Print Post  
Is an empty result set created if an XResult command that would normally create a result set, such as XResultSetForm or XResultSetSearch, fails? Should XResultSetClose be used in that circumstance?

Also, I have been assuming that executing UnloadApplication on a file does not eliminate the need to perform XResultSetClose. Please confirm.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Fundamental question about XResult sets
Reply #1 - Sep 22nd, 2016 at 3:54pm
Print Post Print Post  
Whenever you are finished using a valid (not -1) XResultSet handle, you should close that result set. If the result set is attached to a form (returned by @XResultSetForm), an internal reference counter is kept, and the result set will not actually close until there are no pending references.

UnloadApplication does not eliminate the need to close the result set.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged