它使用1个参数(i_index),但如果我也使用i_datum,我会得到一个错误,如:“从字符串”park_id=100“转换为类型Long无效。”
Public Function detail_kalender(ByVal i_index As Int16, ByVal i_datum As Date) As DataRowView
Dim dv As DataView
Dim anyrow As DataRowView
dv = New DataView
With dv
.Table = myds.Tables("kalender")
.AllowDelete = True
.AllowEdit = True
.AllowNew = True
.RowFilter = "park_id = " & i_index And "datum =" & i_datum
End With
anyrow = dv.Item(0) geeft de eerste rij van de dataview dv
Simple bind to a TextBox control
dv = mydt_parken.DefaultView
Return anyrow
dv.Dispose()
dv = Nothing
End Function