ASP.NET 1.1 怎么访问 MSSQL 2005
<%@ Import namespace="System.Data" %>
<%@ Import namespace="System.Data.SqlClient" %>
<script language="c#" runat="server">
void Page_Load()
{
SqlConnection c = new SqlConnection();
c.ConnectionString = "Password=123;User ID=sa;Initial Catalog=DB_CgaCommunity;server=(local)";
c.Open();
SqlCommand m = c.CreateCommand();
m.CommandText = "Select * From [CommunityCategory]";
m.CommandType = CommandType.Text;
SqlDataReader dr = m.ExecuteReader();
while(dr.Read())
{
Response.Write(dr[0]);
Response.Write("<br />");
}
dr.Close();
c.Close();
c.Dispose();
}
</script>
以上代码 在 ASP.NET 2.0 正常
但 ASP.NET 1.1 就出现 "SQL Server 不存在或访问被拒绝"
请问如何解决