I tried MySqlDataReader and any variation of mycmd.ExecuteScalar() but still there is no success. At last I am using MySqlDataAdapter and Fill method and use some if cases and select one row from there. but this makes the code uglier. Here is the example:
DataSet tmpDs = new DataSet();
myda.Fill(tmpDs);
if (tmpDs.Tables.Count > 0)
if (tmpDs.Tables[0].Rows.Count > 0)
sonuc = tmpDs.Tables[0].Rows[0];
Is there a better way to select one row from MySQL?