Exemplo n.º 1
0
 private void button9_Click(object sender, EventArgs e)
 {
     foreach (string s in MsSql.getColumnsName("t_user"))
     {
         MessageBox.Show(s);
     }
 }
Exemplo n.º 2
0
        private void button7_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();

            dt = MsSql.Table("SELECT u.cn, u.Name, u.Lastname FROM  dbo.t_user AS u WHERE cn = @cn", new string[] { "1" });
            foreach (DataRow dr in dt.Rows)
            {
                MessageBox.Show(dr["Name"].ToString());
            }
        }
Exemplo n.º 3
0
 private void button5_Click(object sender, EventArgs e)
 {
     MsSql.ExecuteQuery("INSERT INTO t_user (Name, Lastname) VALUES (@name, @Lastname)", new string[] { "name1", "lastname1" });
 }