日期:2014-05-18 浏览次数:20549 次
public static DataSet ExecuteTextRet(string cmdText, string TableName)
{
DataSet ds = new DataSet();
OleDbDataAdapter adp = new OleDbDataAdapter();
OleDbCommand cmd = new OleDbCommand();
try
{
PrepareCommand(cmd, CommandType.Text, cmdText);
try
{
adp.SelectCommand = cmd;
adp.Fill(ds, TableName);
return ds;
}
catch (OleDbException e)
{
throw (new Exception(e.Message));
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
DisposeCmd(cmd);
}
}