I used this simple aspx page to get a used to interaction
with a Access database.
Hope it helps,
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script Language="c#" runat="server">
void Page_Load()
{
//ESTABLISH AND OPEN CONNECTION WITH Selection.mdb
string strConnection
= "Provider=Microsoft.Jet.OleDb.4.0;";
strConnection += @"Data Source=C
B\Northwind.mdb";
OleDbConnection objConnection;
objConnection = new OleDbConnection(strConnection);
try
{
objConnection.Open();
con_open.Text="Connection opened
successfully.<br />";
objConnection.Close();
con_close.Text="Connection closed.<br />";
}
catch (Exception e)
{
con_open.Text="Connection failed to open.<br />";
con_close.Text=e.ToString();
}
}
</script>
<html>
<body>
<h4>Testing the data connection
<asp:label id="data_src" runat="server"/></h4>
<asp:label id="con_open" runat="server"/><br />
<asp:label id="con_close" runat="server"/><br />
</body>