'System.Data.DataRowCollection.this[int]' has some invalid arguments

               i am facing a wonderful problem , i can't understand why this error

in my .aspx.cs file

OleDbDataAdapter adpTimeBar = new OleDbDataAdapter("select Emp_Name, Access_Date, Access_Time from Access_Reports ", _OleDbConnString); //_OleDbConnString is string varible used for connection string

        DataTable dtTimeBeta = new DataTable();
DateTime AccessDate1 = new DateTime(0001, 01, 01, 00, 00, 00);
        DateTime AccessDate2 = new DateTime(0001, 01, 01, 00, 00, 00);

AccessDate2 = Convert.ToDateTime(dtTimeBeta.Rows[0]["Access_Date"]);
for (UInt32 i = 0; i < dtTimeBeta.Rows.Count; i++)
            AccessDate1 = Convert.ToDateTime(dtTimeBeta.Rows[i]["Access_Date"]);// error is on this line    "System.Data.DataRowCollection.this[int]' has some invalid arguments"

Plese help me its urgent. Thanks in advance
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

EE_NavigatorConnect With a Mentor Author Commented:
oh yes You Mean in-stead of UInt32 i should use only int ?
Pratima PharandeCommented:
for (UInt32 i = 0; i < dtTimeBeta.Rows.Count -1 ; i++)

use  dtTimeBeta.Rows.Count -1
EE_NavigatorAuthor Commented:
Thanks for commenting..
but i am not i am not getting you the recomemned line by You is allready used
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

EE_NavigatorAuthor Commented:
oh yes , now no error. Thanks Pratima mcs..
Pratima PharandeConnect With a Mentor Commented:
:) , glad to see it helps you
Pratima PharandeCommented:
why my first comment is not accepted ?
All Courses

From novice to tech pro — start learning today.