Inheritance: System.Data.Common.DbConnection
Ejemplo n.º 1
0
        public void open(string URL)
        {
            try
            {

                if (conn == null)
                {
                    conn = new MockConnection(URL);
                    conn.Open();
                }
                else
                {
                    if (conn.State == ConnectionState.Broken
                        || conn.State == ConnectionState.Closed)
                    {
                        conn.Open();
                    }
                }
            }
            catch (DataException)
            {
                conn.Dispose();
            }
        }
Ejemplo n.º 2
0
 public MockCommand(string cmdText, MockConnection connection)
     : this()
 {
     this.CommandText = cmdText;
     this.Connection = connection;
 }