Platform NotSupportedException while trying to Connect SQL Server 2005 SP1 ? RRS feed

  • Question

  • Hi everybody

    After I read an article about connecting SQL Server 2005 SP1 using Smart Device Applications


    I tried that but I got a strange two states :

    1- when the login credentials are wrong I got an exception "Login Field for user 'MyUser' ", I supposed I got it, but !!!

    2- when I corrected the login parameters in the connection string I got an exception "NotSupportedException" .


    using the windows mobile 5 emulator and a smart device application with the following code for connection :




    SqlConnection sqlConn = new SqlConnection("Data Source=myServer;Initial Catalog=myDB;User ID=myUser;pwd=myPassword");

    if (sqlConn.State != ConnectionState.Open)
    MessageBox.Show("The connection Succeeded !");

    catch (SqlException ex)
    catch (Exception ex)
    MessageBox.Show(ex.Message );


    Articles without an example are not clear !
    Sunday, September 6, 2009 8:45 PM


All replies