Connecting to a Local SQL Instance
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
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
SqlConnection oData = new SqlConnection(sConnect);
It always crashed on oData.Open() statement.
I have tried a host of other ways to connect
-- Server Name
-- An "." instead of (local)
I am out of ideas!!
Any help would be greatly appreciated!