The following general concepts apply to ODBC APIs:
Essentially, a handle can be considered as an identifier for a resource that is recognized by ODBC (an environment, connection or statement). ODBC provides an identifier (the handle) for this resource that you can use in your program. Exactly what ODBC stores in the handle (which is held as a long integer) is not relevant. Be careful not to change the value, and to assign unique names to the variables that hold the various handles.
Some APIs set the handle (for example, SQLAllocEnv or SQLAllocHandle with SQL_HANDLE_ENV handle type), and you must pass in a reference, or pointer to the variable. Some APIs refer to a handle that previously was set (for example, SQLExecute), and you must pass in the variable by value.