[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.
Loading
Kirtan PatelPosted Aug 9, 2009, 9:36 PM
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 :)