Search
Author
ASP.NET Tutorials
Author
Sheo Narayan
Advertisements


Winners

Win Prizes

Social Presence
Like us on Facebook

Silverlight Tutorials | Report a Bug in the Tutorial

asp:AccessDataSource control

AccessDataSource control is a data source control that is used to connect to Ms Access database.
 
AccessDataSource control is a data source control that is used to connect to Ms Access database. Instead of ConnectionString property, it has DataFile property that is used to specify Ms-Access database path.

As AccessDataSource control is based on SqlDataSource control, so its properties are almost same as SqlDataSource.
Go to SqlDataSource Control.
DEMO : AccessDataSource Control - Sorry sample is not available for AccessDataSource Control Show Source Code
 
                    
    // DetailsView Control //////////////////////    
    <asp:DetailsView ID="DetailsView1" runat="Server" CellPadding="4" ForeColor="#333333" GridLines="None"
         Width="100%" DataSourceID="AccessDataSource1" AllowPaging="True" AutoGenerateRows="True" DataKeyNames="pid">
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
            <EditRowStyle BackColor="#999999" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        </asp:DetailsView>
    
    
    // AccessDataSource Control //////////////////////
        <asp:AccessDataSource ID="AccessDataSource1" runat="Server" DataFile="~/AnyDb.mdb"
         SelectCommand="SELECT * FROM payments ORDER BY pdate DESC"></asp:AccessDataSource>