Results 1 to 5 of 5

Thread: [RESOLVED] SQLClient connection problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Posts
    164

    Resolved [RESOLVED] SQLClient connection problem

    Hi All
    I am trying to use sqlclient from Pocket PC app I am developing for connecting to SQL Server 2005 database on server.
    I have referance to sqlclient.
    Code looks like as under..

    SqlConnection s_Conn;
    s_Conn = new SqlConnection("Persist Security Info=False;Integrated Security=False;Server=xxx.xxx.xx.xx,xxxx;database=xxxxxx;user id=xxxx;password=xxxx;");
    s_Conn.Open();

    I started app in Pocket PC Emulator SE.
    But I getting following error
    Sql Server does not exists or access denied.
    All user id , password etc are correct still I am not able to open connection.

    Please help resolving this.
    Thanks in advance.

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: SQLClient connection problem

    Hi,
    you tried taking the firewall down whilst you try to connect?
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: SQLClient connection problem

    I just had this issue and it was corrected by me "docking" the emulator.

    http://www.vbforums.com/showthread.php?t=483020

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Posts
    164

    (RESOLVED) Re: SQLClient connection problem

    Thanks
    szlamany's link helped a lot and I could connect to sql database.
    Connection happens only if I first Connect and Cradle the emulator (VS2005 Tools-> Device Emlator Manager) and then start debug.
    If I start debug first and then Cradle, it does not connect and says 'Network Error'.
    Is this the intended behaviour of mob apps. I am new to mob app develpoment so not clear on this.
    Thanks again
    Radhesham

  5. #5
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: [RESOLVED] SQLClient connection problem

    Actually it is incredibily helpful to the developer to be able to "debug" a mobile app with either of those two conditions being emulated!

    Obviously if you want to connect to a network sql server you had better have the emulator state set to "docked".

    And being able to "debug" your app in an "undocked" state is helpful to test logic operations that try to talk to the network.

    I actually like to debug against a real device as well.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width