Dim m As Map
m = DBUtils.ExecuteMap(Starter.sql, "SELECT Project, OriginYear, SurveyType FROM tblProjects WHERE Project = ?", Array As String(spnrProject.SelectedItem, Value))
This results in an error in the log
error in ExecuteMap in dbutils on line:
cur = SQL.ExecQuery2(Query, StringArgs)
java.lang.IllegalArgumentException: Cannot bind argument at index 2 because the index is out of range. The statement has 1 parameters.
It doesnt work because is expecating only one parameter
"SELECT Project, OriginYear, SurveyType FROM tblProjects WHERE Project = ?"
you are passing two parameters
array as string ( sprnProject.selectedItem, value)
But the following works:
Dim m As Map
Dim strProject As String
strProject = spnrProject.SelectedItem
m = DBUtils.ExecuteMap(Starter.sql, "SELECT Project, OriginYear, SurveyType FROM tblProjects WHERE Project = ?", Array As String(strProject))
It works because you passing one parameter.