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
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "DataSources" in [All]

odbc32

.

/// SQLDataSources returns information about a data source. This function is implemented solely by the Driver Manager.

.

static extern short SQLDataSources(IntPtr EnvironmentHandle, short Direction,

.

Declare Function SQLDataSources Lib "odbc32.dll" (ByVal EnvironmentHandle As Integer, ByVal Direction As Short, _

.

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.

.

public static List<string> GetOdbcDataSources()

.

    rc = SQLDataSources(sql_env_handle, SQL_FETCH_FIRST, dsn_name, (short)dsn_name.Capacity, ref dsn_name_len, desc_name, (short) desc_name.Capacity, ref desc_len);

.

        rc = SQLDataSources(sql_env_handle, SQL_FETCH_NEXT, dsn_name, (short)dsn_name.Capacity, ref dsn_name_len, desc_name, (short)desc_name.Capacity, ref desc_len);

.

        nResult = SQLDataSources(hEnv, Dir, sDSN, 64, iNameLen, sDesc, 64, iNameLen2)

.

            nResult = SQLDataSources(hEnv, Dir, sDSN, 64, iNameLen, sDesc, 64, iNameLen2)

.
Documentation
SQLDataSources, SQLAllocHandle, [SQLAllocEnv] on MSDN

odbccp32

.

static extern TODO DataSources(TODO);

.

Declare Function DataSources Lib "odbccp32.dll" (TODO) As TODO

.
Documentation
[DataSources] on MSDN
.
Summary

 
Access PInvoke.net directly from VS: