swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
  Related Syntax     Other Library Functions  
function   SQLAllocHandle   OMDN

Library: omodbc - low-level ODBC support
Include: omodbc.xin
Return type: Integer
Returns:       

An SQL return code. The following values may be returned:

  • SQL_SUCCESS (the environment, connection, statement, or handle has been allocated).
  • SQL_SUCCESS_WITH_INFO (the environment, connection, statement, or handle has been allocated, but a message was issued).
  • SQL_ERROR (an error occurred).
  • SQL_INVALID_HANDLE (the handle is invalid).


Declaration

  define external integer function SQLAllocHandle
     (  value integer HandleType,
        read-only SQL_handle_type InputHandle,
        read-only SQL_handle_type OutputHandle )


Purpose

Allocates an environment, connection, statement, or descriptor handle. This is a generic function for allocating handles. It replaces the following ODBC 2.x functions:

Input arguments:

  1. HandleType. The type of handle to be allocated. The following values are allowed:
  2. InputHandle. The input handle in whose context the new handle is to be allocated. If the handle type is SQL_HANDLE_ENV, this is SQL_NULL_HANDLE. If the handle type is SQL_HANDLE_DBC, this must be an environment handle, and if it is SQL_HANDLE_STMT or SQL_HANDLE_DESC, it must be a connection handle. If the handle type is SQL_HANDLE_ENV and the target connection will be through an ODBC v2.x database driver, the SQL_ATTR_ODBC_VERSION attribute of the environment handle must be set to SQL_OV_ODBC2 using the SQLSetEnvAttr function before SQLAllocHandle is called. Otherwise, a function sequence error will be raised.
  3. OutputHandle. The returned handle.

    Related Syntax
   SQLExecDirect
   SQLExecute
   SQLFreeHandle
   SQLPrepare
   SQLSetConnectAttr
   SQLSetDescField
   SQLSetEnvAttr
   SQLSetStmtAttr
 
  Other Library Functions
   SQL_FUNC_EXISTS
   SQL_IsVersionCompatible
   SQL_LibraryVersion
   SQLAllocConnect
   SQLAllocEnv
   SQLAllocHandle
   SQLAllocStmt
   SQLBindCol
   SQLBindParameter
   SQLBrowseConnect
   SQLBulkOperations
   SQLCancel
   SQLCloseCursor
   SQLColAttribute
   SQLColAttributes
   SQLColumnPrivileges
   SQLColumns
   SQLConnect
   SQLCopyDesc
   SQLDataSources
   SQLDescribeCol
   SQLDescribeParam
   SQLDisconnect
   SQLDriverConnect
   SQLDrivers
   SQLEndTran
   SQLError
   SQLExecDirect
   SQLExecute
   SQLExtendedFetch
   SQLFetch
   SQLFetchScroll
   SQLForeignKeys
   SQLFreeConnect
   SQLFreeEnv
   SQLFreeHandle
   SQLFreeStmt
   SQLGetArrayAsCounter
   SQLGetArrayAsCounterShelf
   SQLGetArrayAsStream
   SQLGetArrayAsStreamShelf
   SQLGetArrayAsString
   SQLGetArrayElementCount
   SQLGetArrayElementLen
   SQLGetConnectAttr
   SQLGetConnectOption
   SQLGetCursorName
   SQLGetData
   SQLGetDescField
   SQLGetDescRec
   SQLGetDiagField
   SQLGetDiagRec
   SQLGetEnvAttr
   SQLGetFunctions
   SQLGetInfo
   SQLGetStmtAttr
   SQLGetStmtOption
   SQLGetTypeInfo
   SQLGetVectorAsCounter
   SQLGetVectorAsStream
   SQLGetVectorAsString
   SQLGetVectorSize
   SQLMoreResults
   SQLNativeSQL
   SQLNumParams
   SQLNumResultCols
   SQLParamData
   SQLParamOptions
   SQLPrepare
   SQLPrimaryKeys
   SQLProcedureColumns
   SQLProcedures
   SQLPutData
   SQLRowCount
   SQLSetArrayAsCounter
   SQLSetArrayAsCounterShelf
   SQLSetArrayAsStream
   SQLSetArrayAsStreamShelf
   SQLSetArrayAsString
   SQLSetArraySize
   SQLSetConnectAttr
   SQLSetConnectOption
   SQLSetCursorName
   SQLSetDescField
   SQLSetDescRec
   SQLSetEnvAttr
   SQLSetPos
   SQLSetScrollOptions
   SQLSetStmtAttr
   SQLSetStmtOption
   SQLSetVectorAsCounter
   SQLSetVectorAsStream
   SQLSetVectorAsString
   SQLSetVectorSize
   SQLSpecialColumns
   SQLStatistics
   SQLTablePrivileges
   SQLTables
   SQLTransact
 
----  

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ OMX ] [ OMX ] [ ERRORS ]

Generated: August 11, 2000 at 3:07:51 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.