This is a discussion on Connecting to a Local SQL Instance - Windows CE ; Hello All. I have been struggling with this for some time now. I have a Windows CE application, and I am trying to pull data from my local SQL Server Instance. I have no problems connecting if it is the ...
Hello All. I have been struggling with this for some time now. I
have a Windows CE application, and I am trying to pull data from my
local SQL Server Instance.
I have no problems connecting if it is the Local Server, but if it is
an instance, i always get the lovely "Specified Sql Server Cannot Be
Found" Exception.
Here is the connection string I am using (C#):
string sConnect = "Data Source=(local)\\[instance name];User
ID=sa;Password=XXX;Initial Catalog=[DB Name];Persist Security
Info=False";
SqlConnection oData = new SqlConnection(sConnect);
It always crashed on oData.Open() statement.
I have tried a host of other ways to connect
-- Server Name
-- Localhost
-- An "." instead of (local)
I am out of ideas!!
Any help would be greatly appreciated!
Marko