Sub ExecuteMap(SQL As SQL, Query As String, StringArgs() As String) As Map
Dim cur As Cursor
If StringArgs <> Null Then
cur = SQL.ExecQuery2(Query, StringArgs)
Else
cur = SQL.ExecQuery(Query)
End If
Log("ExecuteMap: " & Query)
If cur.RowCount = 0 Then
Log("No records found.")
Return Null
End If
Dim res As Map
res.Initialize
cur.Position = 0
For i = 0 To cur.ColumnCount - 1
res.Put(cur.GetColumnName(i).ToLowerCase, cur.GetString2(i))
Next
cur.Close
Return res
End Sub