摘要:ADO.NET Adapter with Datatable
using System.Web.Configuration;
using System.Data.SqlClient;
using System.Data;
string connstr = WebConfigurationManager.ConnectionStrings["conn"].ConnectionString;
using (SqlConnection conn = new SqlConnection(connstr))
{
SqlCommand cmd = new SqlCommand();
cmd.CommandText = " 語法區 ";
cmd.Connection = conn;
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
}