2024年3月9日发(作者:)
closeConnection();
}
}
}
/**/
///
///
返回指定
sql
语句的
dataset
///
///
///
public static DataSet dataSet(string sqlstr, string path)
{
DataSet ds = new DataSet();
OleDbDataAdapter da = new OleDbDataAdapter();
try
{
openConnection(path);
dType = ;
dText = sqlstr;
Command = comm;
(ds);
}
catch (Exception e)
{
throw new Exception(e);
}
finally
{
closeConnection();
}
return ds;
}
/**/
///
///
返回指定
sql
语句的
dataset
///
///
///
public static void dataSet(string sqlstr, ref DataSet ds, string path)
{
OleDbDataAdapter da = new OleDbDataAdapter();
try
{
openConnection(path);
dType = ;
dText = sqlstr;
Command = comm;
(ds);
}
catch (Exception e)
{
throw new Exception(e);
}
finally
{
closeConnection();
}
}
/**/
///
///
返回指定
sql
语句的
datatable
///
///
///
public static DataTable dataTable(string sqlstr, string path)
{
{
DataTable dt = new DataTable();
OleDbDataAdapter da = new OleDbDataAdapter();
try
{
openConnection(path);
dType = ;
dText = sqlstr;
Command = comm;
(dt);
}
catch (Exception e)
{
throw new Exception(e);
}
finally
{
closeConnection();
}
return dt;
}
/**/
///
///
返回指定
sql
语句的
datatable
///
///
///
public static void dataTable(string sqlstr, ref DataTable dt, string path)
{
OleDbDataAdapter da = new OleDbDataAdapter();
try
{
openConnection(path);
dType = ;
dText = sqlstr;
Command = comm;
(dt);
}
catch (Exception e)
{
throw new Exception(e);
}
finally
{
closeConnection();
}
}
/**/
///
///
返回指定
sql
语句的
dataview
///
///
///
public static DataView dataView(string sqlstr, string path)
{
OleDbDataAdapter da = new OleDbDataAdapter();
DataView dv = new DataView();
DataSet ds = new DataSet();
try
{
openConnection(path);
dType = ;
dText = sqlstr;
Command = comm;
(ds);
dv = [0].DefaultView;
dv = [0].DefaultView;
}
catch (Exception e)
{
throw new Exception(e);
}
finally
{
closeConnection();
}
return dv;
}
}
}


发布评论