示例#1
0
 public DBObject(DBConnectObject conn)
 {
     ConnectionObject = conn;
     Connection       = new SqlConnection(ConnectionObject.MakeConnectionString());
     try
     {
         Connection.Open();
         Status = "Connected";
     }
     catch (Exception ex)
     {
         Status = "Connection Failed: " + ex;
     }
 }
示例#2
0
        public void Connect(string Source, string Catalog, string UserName, string Password)
        {
            var connectObject = new DBConnectObject(Source, Catalog, UserName, Password);

            DB = new DBObject(connectObject);
        }