コード例 #1
0
        public static void T_Select_sysdate3()
        {
            //prefer this

            var connStr = GetMySqlConnString();
            var conn    = new MySqlConnection(connStr);
            var tc      = new TaskChain();

            conn.AsyncOpen(tc);
            var cmd = new MySqlCommand("select sysdate()", conn);

            cmd.AsyncExecuteReader(tc, reader =>
            {
                //this example we read each row asynchronously
                //read as
                var dtm = reader.GetDateTime(0);
            });
            conn.AsyncClose(tc);
            tc.WhenFinish(() =>
            {
            });
            tc.Start();
        }