![]() |
|
Archives of the TeradataForumMessage Posted: Fri, 23 Jun 2006 @ 15:08:02 GMT
"Beyond SQL_ACTIVE_STATEMENTS limit" means that your application has tried to create more hStmts than are allowed. It probably means that you are creating a new hStmt each time you submit a new query, but you are not releasing these hStmts after the queries complete. I think the Teradata driver supports up to 16 hStmts but you can check by calling:
SQLGetInfo(hDBC, SQL_ACTIVE_STATEMENTS, iNumAllowed, 2, piLen)
To release an hStmt use:
SQLFreeStmt(hStmt, SQL_DROP) <<< If using ODBC 2.x
SQLFreeHandle(SQL_HSTMT, hStmt) <<< If using ODBC 3.x
Alternatively you can simply free the hStmt using:
SQLFreeStmt(hStmt, SQL_CLOSE)
and re-use it, instead of creating a new one for each query. Mike Dempsey
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||