0

Hi its scorpionz i have some little Problem in Coding i want to
Develop an asp.net application that retrieve records from a table of ms access and display on a page in a grid or html table. Make sure the table has two fields [EmpName, EmpQualification]. The page should provide searching facility of records by EmpName as well as be EmpQualification.
Can please any one help me in how to code this
and also in linking code wih Database of Access
Thanks in Advanced

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by jquick
0

Hi,

That is a pretty vauge question. The best way to get started with data access in .net is to use the Microsoft Data Access Application blocks:

http://www.microsoft.com/downloads/details.aspx?FamilyId=F63D1F0A-9877-4A7B-88EC-0426B48DF275&displaylang=en

Once you download and add these to your app you can perform data access on a access database like this:

public DataSet GetItems(int itemId)
    {
        return Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(
               "MyAccessDatabaseConnectionString", CommandType.CommandText,
               "SELECT * FROM THE TABLES",
               new SqlParameter("@playlistId", itemId));
    }

This function will return a dataset. You can then bind it to a gridview control or datalist.

<asp:datalist id="myDataList" runat="server" />

<%
myDataList.DataSource = GetItems(5);
myDataList.DataBind();
%>

jenni

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.