SQLite Forum

Problem with single quotes Swift/MacOS
Login
From <u>[Declared Datatype Of A Query Result](https://sqlite.org/c3ref/column_decltype.html)</u>: "If the Nth column of the result set is an expression or subquery, then a NULL pointer is returned."

Regarding:

> It seems ppStmt is not set on this moment. I could catch it, however, but in the end my SQl would fail.

If the prepare succeeded, you got a sqlite3_stmt object back.

> Replacing the statement to a command without single quotes works fine instead. Generally there's seems a problem with single quotes of parameters in functions passed by the command in Swift. In the case above a Bind would not work because we're not talking about a Where clause.

I don't know what to make of those assertions. I can only guess what "command without single quotes" means, and whether your "works fine" resembles mine is similarly uncertain. I'm not sure what you mean by "Bind", but binding parameter values within prepared SQL statements is certainly allowed outside of WHERE clauses.