日期:2014-05-18 浏览次数:20887 次
public static DataSet GetTableName()
{
string sql = "select name from sysobjects where type = 'U' ";
SqlConnection con = new SqlConnection(_connectionString);
SqlDataAdapter dad = new SqlDataAdapter(sql, con);
DataSet dst = new DataSet();
try
{
con.Open();
dad.Fill(dst, "GetAllEmpBasicInfo");
}
catch (SqlException e)
{
// Handle exception.
throw new Exception(e.Message);
}
finally
{
con.Close();
}
return dst;
}