Part of the code: const string connStr = @"User ID=Tornado;Pwd=******;Net=dbmssocn;Server=127.0.0.1\DEV;Integrated Security=no;Initial Catalog=LocalDB"; const string cmdText = "SELECT COUNT(*) FROM units"; using (var con = new SqlConnection(connStr)) using (var cmd = new SqlCommand(cmdText, con)) { con.Open(); Console.WriteLine(cmd.ExecuteScalar()); }
Console.WriteLine("BeforeCheckDeploy"); // Deploy if (cmdLine.IsExists(s_DeployKey)) { Console.WriteLine("BeforeDeploy"); TornadoRunner.Deploy(); if (!cmdLine.IsExists(s_RunInConsoleKey)) return 0; } Console.WriteLine("AfterCheckDeploy"); using (var con = new SqlConnection(connStr)) using (var cmd = new SqlCommand(cmdText, con)) { con.Open(); Console.WriteLine(cmd.ExecuteScalar()); } Output: 0 BeforeCheckDeploy AfterCheckDeploy ERROR: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied. at System.Data.SqlClient.SqlConnection.Open () [0x00000] at Parus.Server.Program.Main () [0x00000] Test sample running OK. Any ideas? P.S. Vista, SQL Server 2005 SP2, Mono 1.9 last preview -- With best regards, Andrew Koryavchenko, Visual C# MVP [Architecture]. _______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list