I'm guessing you get hundreds of these questions, but here goes:
So I'm trying to get a Honeywell Dolphin 6100 mobile device (CE5.0, .NET Compact Framework) to talk to an SQL Server Express 2008 database installed on the machine I'm developing on.
I am a complete newbie to SQL Server and mobile development, and am still a little green in C# (yeah I know, jumped in the deep end here, eh? :D)
So far I have:
string sConnection = @"Data Source=JEZ-LAPTOP;DataBase=EMS_Main;Integrated Security=SSPI;";
SqlConnection sqc = new SqlConnection(sConnection);
sqc.Open();
The app deploys quite happily to the 6100, but the last line bugs out with a vague "SQL Exception" error.
I have tried changing the Data Source to include instance names, slashes and dots before it etc etc (even though server is just using the default instance), to no avail.
I can connect to the database in Management Studio with no problems.
So, is the connection string at fault, or is it something I haven't done correctly in SQL Server?
Thanks in advance.
This site is awesome btw, some very knowledgable guys here.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…