Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "SQLAllocEnv" in [All]

odbc32

.

See SQLAllocEnv.

.
Summary
SQLAllocEnv allocates memory for an environment handle and initializes the ODBC call level interface for use by an application. An application must call SQLAllocEnv prior to calling any other ODBC function.
.

static extern short SQLAllocEnv(out IntPtr EnvironmentHandle);

.

    short  rc = SQLAllocEnv(out environmentHandle);

.
Documentation
[SQLAllocEnv] on MSDN
.

if ( SQLAllocEnv(ref hEnv) != SQL_ERROR)

.

You must provide an Environment Handle provided by SQLAllocHandle as the first parameter. SQLAllocHandle is a replacement for SQLAllocEnv. When using SQLAllocHandle, you must call SQLSetEnvAttr and set the SQL_ATTR_ODBC_VERSION attribute to SQL_OV_ODBC3 before calling SQLDataSources. You must release Environment handle with SQLFreeHandle at the end.

.

Populate a combobox control with a list of DSNs, uses SQLAllocEnv and SQLFreeEnv

.

        SQLAllocEnv(hEnv)

.
Documentation
SQLDataSources, SQLAllocHandle, [SQLAllocEnv] on MSDN
.

            if (!isOK(SQLAllocEnv(out environmentHandle)))


 
Access PInvoke.net directly from VS: