Quantcast
Channel: SQL Server Compact Forum
Viewing all articles
Browse latest Browse all 193

any one tell me the code to connect to .sdf file in c# windows application?

$
0
0
Hi,

Any one tell me the code to connect to .sdf file in c# windows application?And tell the requirments to conncet.My sdf file path is this

C:\\Documents and Settings\\koti\\My Documents\\Example.sdf

I write this code.It is not working

 string str = "Provider=Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;Data Source=C:\\Documents and Settings\\koti\\My Documents\\Example.sdf;SSCE:Encrypt Database=True";
                SqlCeConnection cn = new SqlCeConnection(str);
                cn.Open();

Ant one help me Plz...

Regards,
venkat.

Viewing all articles
Browse latest Browse all 193

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>