I would like to connect to SQL Server from windows mobile application. I tried to do that but it raises a SQL exception when the code tries to open the connection. I googled for this issue and I found article make some configuration changes at SQL Server and I followed it and it raise the same exception
: http://netcf2.blogspot.com/2005/12/accessing-sql-server-express-from.html
Tools :
- SQL Server Management Studio 2008 R2
- Windows Mobile 6.0
- VS 2008
- C# project and SQL server at the same machine and I used the same code to connect to SQL Server from desktop application and it was succeeded .
Code :
SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=DBNAME;Trusted_Connection=yes;");
conn.Open();
Your reply will be highly appreciated