我发布了一个问题,要求帮助在vb6中使用来自SQL-SERVER的数据填充ListView。所以我能够做到这一点。我正在加载体育名称,并为每个值分配了ID。这是代码:
lvwExpenditures.ListItems.Clear
With lvwExpenditures
.FullRowSelect = True
.View = lvwReport
.LabelEdit = lvwManual
.ColumnHeaders.Add , "FldName", "Expense", 2200
.ColumnHeaders.Add , "ID", "ID", 0
End With
g_strSQL = "Select FldName, ID, Label, SortOrder from dbo.tblText_References where fldname ='expenditureitems'"
rs.Open g_strSQL, g_cnDatabase, adOpenStatic
Debug.Print g_strSQL
With rs
Do While Not .EOF
Set lvwItem = lvwExpenditures.ListItems.Add(, , .Fields("Label").Value)
lvwItem.SubItems(1) = .Fields("ID").Value 'Populate Date column
.MoveNext
Loop
End With
Set rs = Nothing
所以现在,如果他们愿意,我需要让用户从ListView中选择多个项目。我用复选框做了,但是我试图在没有复选框的情况下这样做。此外,如果用户选择多个项目,我的Insert语句将是什么样子。我只需要保存与ID相关联的ID,并将它们连接起来。谢谢!
答案 0 :(得分:0)
{
"rules": {
".write" : true,
".read" : true,
"accepted_invites": {
"$game_id": {
"$user_id": {
//This validate rule fails
//".validate": "root.child('invites/'+$game_id+'/'+newData.val()).exists()"
//This one works
".validate": "root.child('invites/'+$game_id+'/uuidBBB').exists()"
}
}
}
}
}