Beispiel #1
0
        public void test()
        {
            using (StreamWriter writer = new StreamWriter("C:\\Users\\phil\\Documents\\payroll.txt"))
            {
                writer.WriteLine("test2");

                SQLConn sql = new SQLConn();

                sql.SQLOpen();

                SqlCommand cmd = new SqlCommand("payroll.[dbo].[sp_Employees_Get_All]", sql.SQLConnReturn());

                SqlDataReader reader = cmd.ExecuteReader();

                while (reader.Read())
                {
                    writer.WriteLine(reader["FirstName"]);
                }
            }
        }