コード例 #1
0
        public DataTable LoadDatabaseByServer(string keySection, int idx)
        {
            if (idx == -1)
            {
                return(new DataTable());
            }
            strServer   = GetServerConfig(keySection, idx);
            strUserName = GetUserNameConfig(keySection, idx);
            strPassWord = GetPassWordConfig(keySection, idx);
            //strDBOld = SQLApp.GetIniFile(strFileName, section, _serverDBOld + (cboServer.SelectedIndex + 1));

            SQLDBUtil.ChangeConnection((SqlDbConnectionType)Enum.Parse(typeof(SqlDbConnectionType), keySection), strServer, strUserName, strPassWord);
            return(SQLDBUtil.GetDataTableByDataSet(SQLDBUtil.GetAllDatabases()));
        }