string connectionstring="连接字符串";
string SQLString ="SQL命令";
string RE="";
using (OleDbConnection connection = new OleDbConnection(connectionString))
{
DataSet ds = new DataSet();
try
{
connection.Open();
OleDbDataAdapter command = new OleDbDataAdapter(SQLString, connection);
command.Fill(ds, "ds");
}
catch (System.Data.OleDb.OleDbException ex)
{
;
}
RE= ds.Tables[0].Row[0][0];
}