关于类型转换问题,回家再来看结果……拜托
string s1 = "select ID from 表"; //ID取值为int
try
{
this.oleDbConnectin1.Open();
OleDbDataReader myReader = this.oleDbSelectCommad2.ExecuteReader();
while(myReader.Read())
{
this.textBox1.Text = myReader.ToString(0);
//如果把int转换成string,使用ToString不行,用GetString也不能完全执行。
}
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
finally
{
this.oleDbConnection1.Close();
}
//先回家了,肚子好饿,到了家再来看:)