in your app.config file use this
<configuration>
<appsettings>
<add key="constr" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\sw3\Desktop\Invoicebill.mdb;Persist Security Info=True" />
</appsettings>
</configuration>
and then in form1.cs
OleDbConnection con=new OleDbConnection(ConfigurationSettings.AppSettings["constr"]);
con.open();