Typed Dataset Column Assignment

  • Thread starter Thread starter Miro
  • Start date Start date
M

Miro

I am using a typed dataset
I am defenitly doing something 'wrong' but cant quite figure out what it is
with the syntax I am looking for:

Dim APersonName As String = "John Doe"
Dim currentRow As DataRowView = TryCast(PlayerSettingsBindingSource.Current,
DataRowView)

'This assignment works
currentRow("PersonName") = APersonsName

'But since its a typed dataset, I shouldnt have to put "PersonName" in
quotes.
'Something like this:
currentRow.Item(MyDataDS.PlayerSettings.PersonNameColumn) = APersonsName

I cant quite figure out what the proper syntax is to convert the 'working
line' so I can reference a field in the table without using quotes.

Thanks,

Miro
 
Back
Top