Logical Error in loop when trying to save database records
<p>I'm trying to read all the records of a database using .net, and I have a logical error in the while loop, I can't understand what the problem is, if someone could take a look I would greatly appreciate.</p>

<pre><code>{
    System.Data.OleDb.OleDbConnection  con;
    DataSet dsl;
    System.Data.OleDb.OleDbDataAdapter da;
    public String accessDatabase()
    {
        initializecomponent();

        con = new System.Data.OleDb.OleDbConnection();
        con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Users\\Owner\\Documents\\CIS3052.mdb";
        dsl = new DataSet();
        String displayID = null;
         String displayFname = null;
         String displayLname = null;
         String displayAge = null;
         String displayJob = null;
         String viewAll = null;
         int inc = 0;
         int MaxRows = 0;


        string sql = "SELECT * FROM Employee";
        da = new System.Data.OleDb.OleDbDataAdapter(sql, con);
        con.Open();
        da.Fill(dsl, "Employee");

        MaxRows = dsl.Tables["Employee"].Rows.Count;
        while (inc != MaxRows -1)
        {

        DataRow dRow = dsl.Tables["Employee"].Rows[inc];
        displayID = dRow.ItemArray.GetValue(0).ToString();
        displayFname = dRow.ItemArray.GetValue(1).ToString();
        displayLname = dRow.ItemArray.GetValue(2).ToString();
        displayAge = dRow.ItemArray.GetValue(3).ToString();
        displayJob = dRow.ItemArray.GetValue(4).ToString();
        viewAll = viewAll + displayID + " " + displayFname + " " + displayLname + " " + displayAge + " " + displayJob + " ";
        }



        con.Close();
        con.Dispose();



        return viewAll;
    }


}
</code></pre>

<p>}</p>
