static ServerConfig() { try { connStr = string.Format("server={0};uid={1};pwd={2};database={3}", CfgIniFile.IniReadValue("SERVER_CONFIG", "IPADDRESS", IniFileName), CfgIniFile.IniReadValue("SERVER_CONFIG", "USER", IniFileName), CfgIniFile.IniReadValue("SERVER_CONFIG", "PASSWORD", IniFileName), CfgIniFile.IniReadValue("SERVER_CONFIG", "DATABASE", IniFileName)); } catch { connStr = string.Empty; err = "Config Read Error"; } }
static ServerConfig() { try { connStr = string.Format("Password={2};User ID={1};server={0}", CfgIniFile.IniReadValue("SERVER_CONFIG", "DATABASE", IniFileName), DecryptString(CfgIniFile.IniReadValue("SERVER_CONFIG", "USER", IniFileName)), DecryptString(CfgIniFile.IniReadValue("SERVER_CONFIG", "PASSWORD", IniFileName))); //connStr = string.Format("Data Source={0};User ID={1};Password={2}", // CfgIniFile.IniReadValue("SERVER_CONFIG", "DATABASE", IniFileName), // DecryptString(CfgIniFile.IniReadValue("SERVER_CONFIG", "USER", IniFileName)), // DecryptString(CfgIniFile.IniReadValue("SERVER_CONFIG", "PASSWORD", IniFileName))); } catch { connStr = string.Empty; err = "Config Read Error"; } }