I use ExecuteReader
to select all (SELECT*) for all field like this
string query = "SELECT* FROM tb_patient_information ";
if (this.OpenConnection() == true)
{ //Create Command
MySqlCommand cmd = new MySqlCommand(query, connection);
//Create a data reader and Execute the command
MySqlDataReader dataReader = cmd.ExecuteReader();
while (dataReader.Read())
{ ... }
but I only want to select in specific column and cell like in red square.. like this picture
You can get the specific column inside the while
clause.
while (dataReader.Read())
{
var _column = dataReader["Nama_Kategori"];
}