This function formulates a request to the database server to determine if quotes are
needed. Relevant information is stored in the sqlcode field.
Syntax
unsigned int sql_needs_quotes( SQLCA *sqlca, char * str );
Parameters
- sqlca – A pointer to a SQLCA structure.
- str – A string of characters that is a candidate for a SQL identifier.
Returns
TRUE or FALSE indicating whether the string requires double quotes around it when it is used as a SQL identifier.
Remarks
There are three cases of return value/code combinations:
- return = FALSE, sqlcode = 0 – The string does not need quotes.
- return = TRUE – The sqlcode is always SQLE_WARNING, and the string requires quotes.
- return = FALSE – If sqlcode is something other than 0 or SQLE_WARNING, the test is inconclusive.