Did you check the help page on SOMEE for connecting to an access database?
QUOTE FROM Somee.com help:
Connect to MS access database usin DSN-less connection
Doka only
provides DSN-less connection to the Access databases, because they are
much faster and there is no possible names conflict. Most of the
problems are in choosing right connection string. Here is an example
of tested connection string to MS Access database:
We suppose that your database resides in “Database” subfolder and it name is “TestDB.mdb”.
You’ll have to use
Server.MapPath(“Database\TestDB.mdb”)
in order to get physical
location of database.
So connection string would be:
"PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("Database\TestDB.mdb")
And the way to utilize it:
OleDbConnection conn = null;
OleDbDataReader reader = null;
try
{
conn = new OleDbConnection(
"Provider=Microsoft.Jet.OLEDB.4.0; " +
"Data Source=" + Server.MapPath("Database/TestDB.mdb"));
conn.Open();
OleDbCommand cmd =
new OleDbCommand("Select * FROM Table1", conn);
reader = cmd.ExecuteReader();
datagrid.DataSource = reader;
datagrid.DataBind();
}
// catch (Exception e)
// {
// Response.Write(e.Message);
// Response.End();
// }
finally
{
if (reader != null) reader.Close();
if (conn != null) conn.Close();
}