📅  最后修改于: 2022-03-11 14:49:18.361000             🧑  作者: Mango
using System.Data;
using System.Data.SqlClient;
public DataTable StudentView()
{
SqlConnection sqlCon = new SqlConnection(@"Server= localhost\SQLINSTANCENAME; Database= DBNAME; Integrated Security=True;");
SqlDataAdapter sqlDa = new SqlDataAdapter("QUERY", sqlCon);
DataTable dtbl = new DataTable();
sqlDa.Fill(dtbl);
return dtbl;
}