当我运行该程序时,它会在列表中显示类似这样的内容:“System.Data.DataRow”我将放置图片
private void Form2_Load(object sender, EventArgs e)
{
string connectionString = "Data Source=...;" +
"User=...;" +
"Password=...;";
OracleConnection con = new OracleConnection();
con.ConnectionString = connectionString;
con.Open();
string select = "select PRODUCT from TBLPRODUCTSIM where SOLVERTYPES like " + "'%"+GlobalVariable+"%'";
OracleDataAdapter bb = new OracleDataAdapter(select, con);
DataTable dt = new DataTable();
bb.Fill(dt);
foreach(DataRow row in dt.Rows )
{
listBox1.Items.Add(row.ToString());
}
}
一只甜甜圈
相关分类