예제 #1
0
        public void VerificaAConexao()
        {
            SqlServerConn.configuraStrConnection
                (@"C:\Users\sebastiao.martins\Documents\Visual Studio 2008\Projects\Coletor\z_Auxiliares", "strConn.txt");

            System.Data.SqlClient.SqlConnection conn = SqlServerConn.openConn();
            Assert.AreEqual(ConnectionState.Open, conn.State);
            Console.WriteLine("Opened");
            conn.Close();
            Assert.AreEqual(ConnectionState.Closed, conn.State);
            Console.WriteLine("Closed");
        }
예제 #2
0
 public void starConnection()
 {
     SqlServerConn.configuraStrConnection
         (@"C:\Users\sebastiao.martins\Documents\Visual Studio 2008\Projects\Coletor\z_Auxiliares", "strConn.txt");
     this.Conn = SqlServerConn.openConn();
 }