vitual studio 调试时总是提示无法打开登录所请求的数据库"XX"。登录失败,'sa'登陆失败
Web.config文件如下:configurationxmlns="http://schemas.microsoft.com/.NetConfiguration/v2....
Web.config文件如下:configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings/>
<connectionStrings>
<add name="conn" connectionString="Data Source=.;Initial Catalog=movie;Persist Security Info=True;User ID=sa;pwd=gl;"
providerName="System.Data.SqlClient" />
连接类部分代码如下:由于初学不知问题出在哪!请各位高手指点
public class connClass
{
public string que;
//public static string sqlConnection = System.Configuration.ConfigurationManager.AppSettings["movieConnectionString"].ToString();
public static string mystr = "Data Source=.;Initial Catalog=movie;User ID=sa;pwd=gl;Persist Security Info=true";
public connClass()
{
} 展开
<appSettings/>
<connectionStrings>
<add name="conn" connectionString="Data Source=.;Initial Catalog=movie;Persist Security Info=True;User ID=sa;pwd=gl;"
providerName="System.Data.SqlClient" />
连接类部分代码如下:由于初学不知问题出在哪!请各位高手指点
public class connClass
{
public string que;
//public static string sqlConnection = System.Configuration.ConfigurationManager.AppSettings["movieConnectionString"].ToString();
public static string mystr = "Data Source=.;Initial Catalog=movie;User ID=sa;pwd=gl;Persist Security Info=true";
public connClass()
{
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询