Example #1
0
        public static DataTable GetData()
        {
            string    sql   = @"select * from mytesttable";
            DataTable table = DbHelperForMySQL.Query(sql).Tables[0];

            return(table);
        }
Example #2
0
        public static DataTable GetData(string name)
        {
            string sql = @"SELECT * FROM mytesttable where Test_Name=?Name";

            MySqlParameter[] parms =
            {
                new MySqlParameter("?Name", MySqlDbType.VarChar, 200),
            };
            parms[0].Value = name;
            DataTable table = DbHelperForMySQL.Query(sql, parms).Tables[0];

            return(table);
        }