ManuteBall | 26 Jun 2012 19:04
Picon

SQL SERVER 2008 - IDbConnection.Open exception

Hi,

I am porting an existing .net app to be ran in macosx.

Both my code and example code in(http://www.mono-project.com/SQLClient fail
with same error:

 public class Test
    {
        public Test()
        {
          string connectionString = "Server=DEV-PC\\SQLEXPRESS;" +
          "Database=DBIntranet;" +
          "User ID=user;" +
          "Password=pwd;";
            IDbConnection dbcon;

            using (dbcon = new SqlConnection(connectionString))
            {
                try
                {
                    dbcon.Open();
                }catch (Exception e)
                {
                    Clipboard.SetText(e.Message + " " + e.InnerException + " 
" + e.ToString());
                   }
             ....

This code works fine when "normal-run" in VS2010 but fails when mono-run.
(Continue reading)


Gmane