P
pat
Group,
I have a class that has properties:
[...]
Private _lastUpdated as String
Property lastUpdated() As String
Get
Return _lastUpdated
End Get
Set(ByVal Value As String)
_lastUpdated = Value
End Set
End Property
[...]
I have a dataset that needs to have its values loaded into these
properties, and the attempt has been:
Sub populate(ByVal ds As DataSet)
' load a class via a dataset with a known structure
Dim row As DataRow = ds.Tables(0).Rows(0)
Me.lastUpdated = row.Item("lastUpdated"))
[...]
End Sub
This is called as you might expect:
Dim classInstance As New className
classInstance.populate(ds)
The program hangs anywhere the assignment to the class variable occurs.
And the problem isn't with e dataset, because ANY assignment attempt
yields the same result:
Me.lastUpdated = "I dunno.."
...or even trying to assign to the Private variable..
Should I try to pass the calling object in the Sub's fields and attempt
to update in a "ByRef" way instead of "ByVal"? This would make sense,
as the class itself is not aware of the instance, or does it?
Ideas?
TIA!
pat

I have a class that has properties:
[...]
Private _lastUpdated as String
Property lastUpdated() As String
Get
Return _lastUpdated
End Get
Set(ByVal Value As String)
_lastUpdated = Value
End Set
End Property
[...]
I have a dataset that needs to have its values loaded into these
properties, and the attempt has been:
Sub populate(ByVal ds As DataSet)
' load a class via a dataset with a known structure
Dim row As DataRow = ds.Tables(0).Rows(0)
Me.lastUpdated = row.Item("lastUpdated"))
[...]
End Sub
This is called as you might expect:
Dim classInstance As New className
classInstance.populate(ds)
The program hangs anywhere the assignment to the class variable occurs.
And the problem isn't with e dataset, because ANY assignment attempt
yields the same result:
Me.lastUpdated = "I dunno.."
...or even trying to assign to the Private variable..
Should I try to pass the calling object in the Sub's fields and attempt
to update in a "ByRef" way instead of "ByVal"? This would make sense,
as the class itself is not aware of the instance, or does it?
Ideas?
TIA!
pat
