Using System.Data.OleDb;
public class OleDbMeConnection
{
OleDbConnection con = new OleDbConnection();
public OleDbConnection OpenConnnection()
{
try
{
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=temp.mdb; Jet OLEDB:Database Password=mypassword";
return con;
}
catch (Exception ex)
{
throw ex;
}
}
}
No comments:
Post a Comment