Hi all, im getting nowhere fast (i've read pages of google, msdn, daniweb...., etc) yet no one seems to have answered a question that sorts out my problem, so any help would be great. Thanks in advance.
Background: Developing a desktop app in Visual C# 2010, that allows a user to add / edit / delete from a database. I have it working great when using a SQL Server 2008 R2 database (.mdf database). But now I want to connect to a .sdf local (ie in the same
directory as my app code) database and no matter what I try for my connection string it just gives me the following error
'A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
(provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)'
yes there are other posts that have this error but none of the answers seem to help me.
im using SQL Server Compact 3.5.
I have tried the following recommended connectionstring:
SqlConnection con = new SqlConnection();
con.ConnectionString = "Data Source=|DataDirectory|\\MotDatesDatabase.sdf; Persist Security Info=False";
and also a few other that have the full data path in them, one
View Complete Post