You created a malformed SQL statement by not quoting the combo box value properly (according to the underlying database used). If you don’t want to worry about quoting and the possibility of SQL injection, try
B4X:
DBUTILS.ExecuteTableView(sql1,"Select GroupName, Name, Loginname , Cellular from GroupsMembers WHERE GroupName = ?", Array as object (ComboGroups.Value ),0,TableViewMembers)
the array as object may also be array as string (not in front of computer at the moment)
You created a malformed SQL statement by not quoting the combo box value properly (according to the underlying database used). If you don’t want to worry about quoting and the possibility of SQL injection, try
B4X:
DBUTILS.ExecuteTableView(sql1,"Select GroupName, Name, Loginname , Cellular from GroupsMembers WHERE GroupName = ?", Array as object (ComboGroups.Value ),0,TableViewMembers)
the array as object may also be array as string (not in front of computer at the moment)
Thank you for you reply but i got this error using that
java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.lang.String; ([Ljava.lang.Object; and [Ljava.lang.String; are in module java.base of loader 'bootstrap')
Which is not what you intended. Your flavor of sql sees that as comparing the value in the column GroupName to the value of the column of Family, a column that does not exist and therefore the error message in your first post. Even though, this shows that if possible you should not build your own sql statements. Use ExecuteTableViews ability to work with parameterized queries to let jdbc handle the creation of the proper sql for you. For my example to work, just replace array as object with array as string
Which is not what you intended. Your flavor of sql sees that as comparing the value in the column GroupName to the value of the column of Family, a column that does not exist and therefore the error message in your first post. Even though, this shows that if possible you should not build your own sql statements. Use ExecuteTableViews ability to work with parameterized queries to let jdbc handle the creation of the proper sql for you. For my example to work, just replace array as object with array as string