Exemplo n.º 1
0
        private void Update_Click(object sender, RoutedEventArgs e)
        {
            sql = "select * from uoption where opt_id = ?";
            OdbcCommand cmd;
            DataTable   dr = OdbcTool.ExecuteDataTable(sql, out cmd, "900002");

            dr.Rows[0]["note"] = "csj1";
            int rtn = OdbcTool.UpdateDataTable(dr, cmd);

            MessageBox.Show(rtn.ToString());
        }
Exemplo n.º 2
0
        public static void testODBCDataSet()
        {
            String      sql = "select * from uoption where opt_id = ?";
            OdbcCommand cmd;
            DataTable   table = OdbcTool.ExecuteDataTable(sql, out cmd, "900002");

            table.Rows[0][3] = table.Rows[0][3].ToString() + "c";
            int rtn = OdbcTool.UpdateDataTable(table, cmd);

            Console.WriteLine(rtn.ToString());
        }