它使用1个参数(i_index),但如果我也使用i_datum,则会出现如下错误:“从字符串”park_id = 100“转换为键入”Long“无效。是否可以在dataview.rowfilter中使用2个参数?怎么样?
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
你是什么'i_'前缀的意义是什么? – 2011-05-24 14:47:21
如果类型是整数,我通常使用i! – Rachid 2011-05-25 09:23:30
那你为什么在i_datum上使用它? – Smudge202 2011-05-25 10:02:55