I'm new to database and I've been following a few tutorials but I'm stuck with trying to connect to my database using compact edition that I created in Visual Studio.
I'm trying to connect to the database by:
string connection = "Data Source=C:/Users/PLOW/Documents/Visual Studio 2012/Projects/File Name/File Name/Users.sdf";
// Making SQL connection
SqlConnection cn = new SqlConnection(connection);
cn.Open();
Doing so I get this 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..."
I tried:
string connection = @"Data Source=|DataDirectory|\Users.sdf";
and I get the same error. I don't know how connect it at this point.
This are my connection string: