[code]
_alwaysOpenCon = new SqlConnection(@"Data Source=db.ppp.com.au;database=sales;uid=xxx;pwd=yyy");
_alwaysOpenCon.Open();
[/code]
i use the exact same code for my windows application and it works fine. I try to use the same connection string for my windows mobile application and somehow it fails to connect. The only exception msg given is only "ex.Message = "SqlException". Please advise how I can go about solving this problem. Thanks.
Connecting SQL Server 2005 database from Windows Mobile 6.0
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Kirtan PatelRank #292 · 8.6K reputationPosted Aug 9, 2009, 5:36 PM EDT
You may be have problem in your Connection String for Mobile application . and Make Sure you Use SQL Server Compact Edition Database Not the One Which is Used In Windows Application.
Go to Choose Data -> Add New Data Source From Following screen Copy Connection String and Paste it in Your Code
Then Try to Open Connection :)