sqlSelect and sqlExecute paramarrays

In iOS both sqlSelect and sqlExecute use the form sqlExecute(sql, paramarray).

Unfortunately at the time I call the commands, I only know the contents of the paramarray programatically.

So how can I create the Select or Execute commands programatically?

I could imaging having to use the ubound of an array of parameters and use a select case to manually generate a range of select statements - but it doesn’t feel very elegant. Is there a better way?

When constructing the values ParamArray, create a second array for the field names. Then use that to join these field name array into a string which you can use in the part of the SQL command (probably most often in the WHERE clause for SELECT statements and in the field names list in SQLExecute statements).

Thats this How To Pass Unknown Number Of Parameters to SQLUpdate - iOS - Xojo Programming Forum