ASA Programming Guide
Embedded SQL Programming
Library function reference
unsigned int sql_needs_quotes( SQLCA *sqlca, char *str );
Returns a Boolean value that indicates whether the string requires double quotes around it when it is used as a SQL identifier. This function formulates a request to the database server to determine if quotes are needed. Relevant information is stored in the sqlcode field.
There are three cases of return value/code combinations:
return = FALSE, sqlcode = 0 In this case, the string definitely does not need quotes.
return = TRUE In this case, sqlcode is always SQLE_WARNING, and the string definitely does need quotes.
return = FALSE If sqlcode is something other than SQLE_WARNING, the test is inconclusive.