Informix ESQL/C 'Free' Command
Posted in 1991
Hello Informix-netters! I have just been perusing the Informix ESQL/C "Programmer's Manual", looking up information on the 'prepare' statement. I then followed a reference from 'execute' to 'free'; I have a question concerning the use of 'free', as the manual is not very explicit as to WHEN to use 'free'. My use of the 'prepare' statement has been to prepare 'select statements' for update for a cursor. Each time I want to use new values in my select statement, I re-prepare the select statement. (I need to since I am using the select statement for a CURSOR and the '?' does not bode well.) My question is, should I be 'free'ing the 'select' statement when I close the cursor? Does it matter, since I am always preparing the select statement? I also have cursors that are NOT declared for update. Again, I declare the statement each time I use new values for the selection criteria. Should I be 'free'ing the Cursor when I'm finished using it? Does anyone known what 'resources' are allocated by the database engine that warrants a 'free' command? In case it matters, we're running Informix-SE in a Sun SPARC environment running SunOS 4.1.1. If anyone wants more details, I'll be glad to comply. Thanks in advance. Joseph P. Tokarski Senior Software Engineer General DataComm, Inc. (203) 758-1811 ext. 7067 email: tokarski@nms.gdc.portal.com