DataRecordInternal

  • Thread starter Thread starter mark.norgate
  • Start date Start date
M

mark.norgate

Hello

I have a problem in my repeater's OnItemCreated method.

I'm trying to get the data row for the repeater like this:

Dim datar As DataRow = CType(e.Item.DataItem, DataRow)

but the compiler complains "Unable to cast object of type
'System.Data.Common.DataRecordInternal' to type
'System.Data.DataRow'". What the hell is a DataRecordInternal? And why
isn't my DataItem a DataRow?

Can someone help?

Ta,

Mark
 
DataRecordInternal is internal type as its name suggests, and it warps data
got from DataReader to a datarecord. It's used by DBEnumerator.Move method.

Can you show the code how you databind the result set? Are you using
GetEnumerator method or DBEnumerator type somewhere?
 
Back
Top