How use sdf
-
what's connection string for sdf file ?
-
what's connection string for sdf file ?
This [^] can help you
See my article about Windows 7 Taskbar timer here on CodeProject
-
This [^] can help you
See my article about Windows 7 Taskbar timer here on CodeProject
I used this connectionString "Data Source=|DataDirectory|TMCDataBase.sdf;Persist Security Info=False" Error : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
-
I used this connectionString "Data Source=|DataDirectory|TMCDataBase.sdf;Persist Security Info=False" Error : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
How did you initialize the connection? I think you have used this:
conn = new SqlConnection("Data Source=|DataDirectory|TMCDataBase.sd;Persist Security Info=False");
But the correct way is:
conn = new SqlCeConnection("Data Source=|DataDirectory|TMCDataBase.sd;Persist Security Info=False");
In order to use
SqlCeConnection
class, you should reference System.Data.SqlCe.dll.See my article about Windows 7 Taskbar timer here on CodeProject