如题帮帮忙吧!!!部分代码: public static ArrayList getData()
{ MySqlConnection con = new MySqlConnection("Host=localhost;Port=3306;UserName=guru2b;Password=g00r002b;Persist Security Info=True;Database=coalthreed");
con.Open();
string str = "select *from TestData";
MySqlDataAdapter da = new MySqlDataAdapter(str, con);
DataSet ds = new DataSet(); da.Fill(ds);
count = ds.Tables[0].Rows.Count;
ArrayList List1 = new ArrayList();
Random ran = new Random();
for (int i = 0; i < count; i++)
{
List1.Add(Convert.ToInt32(ds.Tables[0].Rows[i][1]));
}
return List1;
}数据库C#mysql
{ MySqlConnection con = new MySqlConnection("Host=localhost;Port=3306;UserName=guru2b;Password=g00r002b;Persist Security Info=True;Database=coalthreed");
con.Open();
string str = "select *from TestData";
MySqlDataAdapter da = new MySqlDataAdapter(str, con);
DataSet ds = new DataSet(); da.Fill(ds);
count = ds.Tables[0].Rows.Count;
ArrayList List1 = new ArrayList();
Random ran = new Random();
for (int i = 0; i < count; i++)
{
List1.Add(Convert.ToInt32(ds.Tables[0].Rows[i][1]));
}
return List1;
}数据库C#mysql
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货