Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

When executing a Data Driven Testcase the following error occurs: Maximum number of SQL handles has been exceeded. How can I alleviate this?

When executing a Data Driven Testcase the following error occurs: Maximum number of SQL handles has been exceeded. How can I alleviate this?

This behaviour is typical of a SilkTest script that is assigning handles for a testing session that are not being closed after they have been finished with.

Typical handles are applied to the following methods:
1. DB_Connect function: the returned handle to a database connection.
2. DB_ExecuteSql function: the returned handle to the executed SQL statement.

It is therefore very important to close whatever handle you have assigned once it has been finished with. Currently SilkTest has a capacity to deal with 1024 handles, therefore once this threshold has been breached the resulting error will occur.

"Maximum number of SQL handles has been exceeded"

An example of this would be

// Set Up Handles for SQL command and Database Connection

HANDLE hDB = DB_Connect("DSN=Book1") // DB handle
HANDLE hSQL // sql handle

hSQL = DB_ExecuteSQL(hDB, "SELECT * FROM `Sheet1$``Sheet1$` WHERE `Sheet1$`.Name="John"")

// Close these handles when finished with to reduce number of open handles.

DB_FinishSql (hSQL)
DB_Disconnect (hDB)

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:28
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.