こんにちは、 を読むのに問題がありますMySqlDataReader
。私はに変更しようとしましたがwhile()
、if()
それはうまくいきました。だから私は何か間違ったことをしていwhile (Reader.Read())
ます。ご回答ありがとうございます。(今日の他の質問は修正されました。コメントしてくれた人が私を助けてくれましたxd)
using (MySqlCommand cmd = new MySqlCommand
("SELECT * FROM `citationer`", mysqlCon))
{
try
{
MySqlDataReader Reader = cmd.ExecuteReader();
while (Reader.Read()) // this part is wrong somehow
{
citationstexter.Add(Reader.GetString(loopReading)); // this works
loopReading++; // this works
}
Reader.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}