W
Wayne Wengert
How do I code a Find method for a dataset that has a multiple column primary
key. I tried the following but it won't accept the syntax of the Find. The
prinmary key is a combination of the name and uclass columns.
=========== code ===========
Public Function FindUnitRow(ByVal name As String, ByVal uclass As String)
FindUnitRow = ds.Tables(0).Rows.Find(name, uclass)
If FindUnitRow Is Nothing Then
MsgBox("Entry not found for: " & name & " - " & uclass,
MsgBoxStyle.Critical, "Unit Record Not Found")
End If
End Function
=======================================
Wayne
key. I tried the following but it won't accept the syntax of the Find. The
prinmary key is a combination of the name and uclass columns.
=========== code ===========
Public Function FindUnitRow(ByVal name As String, ByVal uclass As String)
FindUnitRow = ds.Tables(0).Rows.Find(name, uclass)
If FindUnitRow Is Nothing Then
MsgBox("Entry not found for: " & name & " - " & uclass,
MsgBoxStyle.Critical, "Unit Record Not Found")
End If
End Function
=======================================
Wayne