EE_Navigator
asked on
'System.Data.DataRowCollection.this[int]' has some invalid arguments
Hi
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();
adpTimeBar.Fill(dtTimeBeta );
DateTime AccessDate1 = new DateTime(0001, 01, 01, 00, 00, 00);
DateTime AccessDate2 = new DateTime(0001, 01, 01, 00, 00, 00);
AccessDate2 = Convert.ToDateTime(dtTimeB eta.Rows[0 ]["Access_ Date"]);
for (UInt32 i = 0; i < dtTimeBeta.Rows.Count; i++)
{
AccessDate1 = Convert.ToDateTime(dtTimeB eta.Rows[i ]["Access_ Date"]);// error is on this line "System.Data.DataRowCollec tion.this[ int]' has some invalid arguments"
Plese help me its urgent. Thanks in advance
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();
adpTimeBar.Fill(dtTimeBeta
DateTime AccessDate1 = new DateTime(0001, 01, 01, 00, 00, 00);
DateTime AccessDate2 = new DateTime(0001, 01, 01, 00, 00, 00);
AccessDate2 = Convert.ToDateTime(dtTimeB
for (UInt32 i = 0; i < dtTimeBeta.Rows.Count; i++)
{
AccessDate1 = Convert.ToDateTime(dtTimeB
Plese help me its urgent. Thanks in advance
ASKER
Thanks for commenting..
but i am not i am not getting you the recomemned line by You is allready used
but i am not i am not getting you the recomemned line by You is allready used
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
oh yes , now no error. Thanks Pratima mcs..
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
why my first comment is not accepted ?
use dtTimeBeta.Rows.Count -1