Allocate a statement handle.
| 2179 | |
| 2180 | // Allocate a statement handle. |
| 2181 | ISC_STATUS API_ROUTINE isc_dsql_allocate_statement(ISC_STATUS* userStatus, isc_db_handle* dbHandle, |
| 2182 | isc_stmt_handle* stmtHandle) |
| 2183 | { |
| 2184 | StatusVector status(userStatus); |
| 2185 | CheckStatusWrapper statusWrapper(&status); |
| 2186 | IscStatement* statement = NULL; |
| 2187 | |
| 2188 | try |
| 2189 | { |
| 2190 | RefPtr<YAttachment> attachment(translateHandle(attachments, dbHandle)); |
| 2191 | |
| 2192 | nullCheck(stmtHandle, isc_bad_stmt_handle); |
| 2193 | |
| 2194 | statement = FB_NEW IscStatement(attachment); |
| 2195 | statement->addRef(); |
| 2196 | attachment->childIscStatements.add(statement); |
| 2197 | *stmtHandle = statement->getHandle(); |
| 2198 | } |
| 2199 | catch (const Exception& e) |
| 2200 | { |
| 2201 | if (statement) |
| 2202 | { |
| 2203 | *stmtHandle = 0; |
| 2204 | statement->release(); |
| 2205 | } |
| 2206 | e.stuffException(&statusWrapper); |
| 2207 | } |
| 2208 | |
| 2209 | return status[1]; |
| 2210 | } |
| 2211 | |
| 2212 | |
| 2213 | // Describe output parameters (columns) for a prepared statement. |
nothing calls this directly
no test coverage detected