DataRecordInternal

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
 
T

Teemu Keiski

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top