Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement