private void GetODBCDriverList() { DevToolShed.OdbcDataSourceManager dsnManager = new DevToolShed.OdbcDataSourceManager(); System.Collections.SortedList dsnList = dsnManager.GetAllDataSourceNames(); for (int i = 0; i < dsnList.Count; i++) { string sName = (string)dsnList.GetKey(i); DevToolShed.DataSourceType type = (DevToolShed.DataSourceType)dsnList.GetByIndex(i); dropDownDriverList.Items.Add(sName); } }
private void GetODBCDriverList() { DevToolShed.OdbcDataSourceManager dsnManager = new DevToolShed.OdbcDataSourceManager(); System.Collections.SortedList dsnList = dsnManager.GetAllDataSourceNames(); for (int i = 0; i < dsnList.Count; i++) { string sName = (string)dsnList.GetKey(i); DevToolShed.DataSourceType type = (DevToolShed.DataSourceType)dsnList.GetByIndex(i); dropDownDriverList.Items.Add(sName); } }
public Form1() { InitializeComponent(); DevToolShed.OdbcDataSourceManager dsnManager = new DevToolShed.OdbcDataSourceManager(); System.Collections.SortedList dsnList = dsnManager.GetAllDataSourceNames(); for (int i = 0; i < dsnList.Count; i++) { string sName = (string)dsnList.GetKey(i); DevToolShed.DataSourceType type = (DevToolShed.DataSourceType)dsnList.GetByIndex(i); //comboBox1.Items.Add(sName + " - (" + type.ToString() + " DSN)"); } }