摘要: public static string getTier(string sql) { //创建数据库连接 SqlConnection con = createCon(); //打开数据库连接 con.Open(); //创建DataAdapter对象 SqlDataAdapter sda = new SqlDataAdapter(sql, con); //创建DataSet对象 DataSet ds = new DataSet(); //使用Fill方法填充DataSet对象 sda.Fill(ds); //获取表中首行首列的数据 string str = ds.Tables[0].Rows[ 阅读全文
posted @ 2013-06-08 09:03 Tnu 阅读(215) 评论(0) 推荐(0) 编辑