Just upgraded a client from ADS 9.1 to ADS 12.0, and started receiving Error 7216. Documentation states that the default limit of open SQL Statements for 12.0 has been set to 50 and to change it to unlimited, have to use the SQL_STATEMENT_LIMIT parameter and set it to 0. In the ADS Windows Configuration utility, I see a parameter for connections, and this is set to 100, and shows a maximum of 51, so I don't think I can use this utility to change the SQL_STATEMENT_LIMIT. I see there is an ads_cfg.ini file, but it is no longer mentioned in the documentation. Can I use it, or do I have to edit the registry directly? If the latter, what is the registry key that I need to use? Using delphi 2009.

asked 08 Mar '16, 11:59

jerrykogan's gravatar image

accept rate: 0%

goto HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Advantage\Configuration add a DWORD key named SQL_STATEMENT_LIMIT and set it to the reuired value (e.g. 0 for disabled). After changing a config parameter you need to restart ADS.
the other way is to run following SQL statement on any new connection:

EXECUTE PROCEDURE sp_SetStatementLimit(0);


answered 08 Mar '16, 12:23

Joachim%20Duerr's gravatar image

Joachim Duerr
accept rate: 18%

Thanks for your help. //Just to confirm the Delphi Code that follows the: AdsConnection1.Connect; // would be: AdsConnection1.Execute('EXECUTE PROCEDURE sp_SetStatementLimit(0)');

(08 Mar '16, 13:35) jerrykogan

correct. That disables the limitation on this connection. You have to do that on every connection unless you configure it.

(09 Mar '16, 12:55) Joachim Duerr
Your answer to the original question.
If responding to a request for additional information, please edit the question or use the comment functionality.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 08 Mar '16, 11:59

Seen: 2,694 times

Last updated: 09 Mar '16, 12:55

Advantage Developer Zone Contact Us Privacy Policy Copyright Info

Powered by Advantage Database Server and OSQA
Disclaimer: Opinions expressed here are those of the poster and do not necessarily reflect the views of the company.