不支持关键字: “integarted security”。

来源:百度知道 编辑:UC知道 时间:2024/06/16 23:31:13
不支持关键字: “integarted security”。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.ArgumentException: 不支持关键字: “integarted security”。

源错误:

行 193: private void mybind1()
行 194: {
行 195: SqlConnection mysql = new SqlConnection("data source=localhost;integarted security=true;initial catalog=myexample");
行 196: SqlCommand mycmd = new SqlCommand("select username from mytable", mysql);
行 197: SqlDataReader mydr= mycmd.ExecuteReader();

Integrated Security
拼写错误

唔……
——————————
把连接字符串改成:
Server=localhost;uid=sa;pwd=;database=myexample试下。

你写错了大哥...!!!

integrated security

你把"r"和"a"写反了..

删掉 不是必要项