111,126
社区成员
发帖
与我相关
我的任务
分享
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;
}