Typed Dataset Column Assignment

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
 

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