Class OdbcFunctions

ODBC API function wrapper.

Note that when testing this, both 32-bit and 64-bit USER DSNs are visible in the resulting list. MSDN KB article on this: http://support.microsoft.com/kb/942976

System.Object
  Stonefield.Library.OdbcFunctions
public static class OdbcFunctions : object

Class Members

MemberDescription

GetDatabaseFromDSN

Given a DSN name, returns the database name associated with that DSN. The database name is denoted by different specifiers, depending on the driver. This function currently supports "DB", "Database", "dbq", "DefaultDir", "SourceDB", "DatabaseName", "DataDirectory"

public static string GetDatabaseFromDSN(string dataSourceName)

GetOdbcDataSources

Obtains all the ODBC DSNs installed on the system and returns them in a List.

public static List GetOdbcDataSources()

GetServerFromDSN

Given a DSN name, returns the server name associated with that DSN.

public static string GetServerFromDSN(string dataSourceName)

Requirements

Namespace: Stonefield.Library
Assembly: library.dll