我在C#是一个初学者,所以它不是鼓励我看到你对我的基本问题否决...味精BOX概率在C#
这是一个按钮在消息框中的结果显示我的从我的BD中选择。
我得到的错误:参数“2”:无法从“对象”到“串”, 参数转换成“3”:无法从“对象”转换为“System.Windows.Forms.MessageBoxButtons”
感谢帮助我!
private void Button1Click(object sender, EventArgs e)
{
thisConnection.Open();
SqlCommand thisCommand = thisConnection.CreateCommand();
thisCommand.CommandText = "Select id_Client,numéro_Teléphone from Clients";
SqlDataReader thisreader = thisCommand.ExecuteReader();
while (thisreader.Read())
{
MessageBox.Show(thisreader["id_Client"],thisreader["numéro_Teléphone"]);
}
thisreader.Close();
thisConnection.Close();
}
不知道为什么这是获取DV'd。他先试了一下,然后发布了他的代码和错误消息。不能要求别的。 :) –