SQL server CE Connection

  •  

    Can anyone please help me ... its urgent....

    I am working with PDA application but not able to connect to .sdf file. I am using following connection string

    SqlCeConnection con = new SqlCeConnection("Data Source =.\\TestDB.sdf; Password =testdb;");

    but it is giving me error like: --

    The database file cannot be found. Check the path to the database. [ File name = .\TestDB.sdf ]

    Please tell me where I am going wrong.

    Thanks in advance.

  • Have you tried without the ".\\" ?

     

    Just using ...

    SqlCeConnection con = new SqlCeConnection("Data Source =TestDB.sdf; Password =testdb;");

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply