我在vb.net中有以下查询,它给出了第二行预期的错误表达式 在我的代码中,第二行是& “来自群组,Group_permissions”& _ 它突出了&用蓝色说预期表达?
Using Grp As New OleDb.OleDbDataAdapter(" select Groups.Group_ID, Count
(Group_PErmissions.Access_ID) as Cnt " & _
& " from Groups, Group_Permissions " & _
& " where Groups.Group_Id = Group_Permissions.Group_ID " & _
& " and Groups.Group_Name = " & "'" &
Cmb_Groups.Text & "'" & _
& " group by Groups.Group_Id ", App_Connection )
End Using
提前致谢
答案 0 :(得分:0)
Using Grp As New OleDb.OleDbDataAdapter(" select Groups.Group_ID, Count (Group_PErmissions.Access_ID) as Cnt " & _
" from Groups, Group_Permissions " & _
" where Groups.Group_Id = Group_Permissions.Group_ID " & _
" and Groups.Group_Name = " & "'" & Cmb_Groups.Text & "'" & _
" group by Groups.Group_Id ", App_Connection )
End Using
我没有在VB中测试过其他语法错误。但这应该可以解决您所看到的错误。