Good Help me find a ghost)
C # + SQL SERVER, trying to connect. The default settings, the Studio is connected to the database, and it’s a shame, to pour on the connection
string mybd_host = "."; string mybd_name = "Awr2015"; string mybd_user = ""; string mybd_pass = ""; string connetionString = "Data Source=" + mybd_host + ";Initial Catalog=" + mybd_name + ";User ID=" + mybd_user + ";Password=" + mybd_pass + ""; SqlConnection cnn = new SqlConnection(connetionString); try { try { Console.WriteLine("Connection Open !"); cnn.Open();//вот тут ошибка cnn.Close(); } catch (Exception exp) { Console.WriteLine("connection:" + exp); } } catch (Exception ex) { Console.WriteLine("Can not open connection:" + ex);//mysql } Connection passes, Connection Open, but when opening a connection, an error occurs, an exception is thrown: "System.Data.SqlClient.SqlException" in System.Data.dll
those. there is access, but when you open it there is no access. Gentlemen, put on the right path, what to fix to open a connection to the database?