日期:2014-05-18 浏览次数:20826 次
string sql_no = "select count(id) from red where 1 = 1";//头一个一位字段名, string strpath = System.Windows.Forms.Application.StartupPath + @"..\记录.mdb"; string ole_conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strpath + ";User Id=admin;Password=;"; OleDbConnection conn = new OleDbConnection(ole_conn); OleDbCommand red_cmd = new OleDbCommand(sql_red,conn); conn.Open(); r_l1.Text = red_cmd.ExecuteScalar().ToString();