Connecting Tech Pros Worldwide Forums | Help | Site Map

Microsoft Access with ASP.net

Me
Guest
 
Posts: n/a
#1: Nov 17 '05
Is it possible to use ASP.net with Microsoft Access. From
what I can find ASP.net only works with SQL server.
That's kind of step backward from being able to access
any data source.

dot365
Guest
 
Posts: n/a
#2: Nov 17 '05

re: Microsoft Access with ASP.net


Yes, you can use Access with ASP.net.

Instead of the Sql objects, you can use the Oledb objects.


"Me" <me@me.com> wrote in message
news:00d301c33c13$6e1d3940$a601280a@phx.gbl...[color=blue]
> Is it possible to use ASP.net with Microsoft Access. From
> what I can find ASP.net only works with SQL server.
> That's kind of step backward from being able to access
> any data source.[/color]


Me
Guest
 
Posts: n/a
#3: Nov 17 '05

re: Microsoft Access with ASP.net


I'm new at ASP.net. I was playing with a dat grid but
could not figure out how to point it to an Access
database. I probably need to read more.

Thanks
[color=blue]
>-----Original Message-----
>Yes, you can use Access with ASP.net.
>
>Instead of the Sql objects, you can use the Oledb[/color]
objects.[color=blue]
>
>
>"Me" <me@me.com> wrote in message
>news:00d301c33c13$6e1d3940$a601280a@phx.gbl...[color=green]
>> Is it possible to use ASP.net with Microsoft Access.[/color][/color]
From[color=blue][color=green]
>> what I can find ASP.net only works with SQL server.
>> That's kind of step backward from being able to access
>> any data source.[/color]
>
>
>.
>[/color]
Leif
Guest
 
Posts: n/a
#4: Nov 17 '05

re: Microsoft Access with ASP.net


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:DB\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>
</html>

[color=blue]
>-----Original Message-----
>Is it possible to use ASP.net with Microsoft Access. From
>what I can find ASP.net only works with SQL server.
>That's kind of step backward from being able to access
>any data source.
>.
>[/color]
Closed Thread