Problem with connecting to database from Pocket PC Emulator

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dege
    New Member
    • Aug 2007
    • 2

    Problem with connecting to database from Pocket PC Emulator

    Hi,
    I am developing a Device Aplication in C# and I have a problem with connection from Visual Studio 2005 to SQL Server 2005.
    My connection string should be correct:
    Code:
    SqlConnection cn = new SqlConnection;
    cn.ConnectionString="Data source=MyPC;Initial Catalog=MyDB;User ID=MyID;Password=MyPassword;"
    try {
    cn.Open // this is where I get sqlException: Specified SQL server not found: MyPC
    ...
    I enabled TCP/IP in SQL Server Configuration Manager under "Protocols for MSSQL" and cleared TCP Dynamic ports. I set in menu "IP All" TCP Port to 1433. I restarted the server.
    I turned off the firewall.
    When I run
    Code:
    netstat -n -a
    in the command prompt I can see address 0.0.0.0:1433 LISTENING.
    I can add a new DataSet to my project from menu Data->Add Connection. I use SQL Server Authentication with a correct name/password. When I press the button "Test Connection" it works.

    I also added DataGrid to the form using the added DataSet. When I debug the project with the Pocket PC 2003 SE Emulator deployed I get instead of the data table sqlException.
    Can anyone help me ?
  • dege
    New Member
    • Aug 2007
    • 2

    #2
    The other problem that I had was that I was using Windows Vista.
    I found out that I needed to upgrade Emulator to the version 2.0 and to install Windows Mobile Device Center.
    I set up the connection to emulator as "DMA default".
    The last thing was to set up emulator as "Cradle" in Device Emulator Manager.

    Comment

    Working...