Inheritance: System.Data.Common.DbConnection
Esempio 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();
            }
        }
Esempio n. 2
0
 public MockCommand(string cmdText, MockConnection connection)
     : this()
 {
     this.CommandText = cmdText;
     this.Connection = connection;
 }