Is there any way to set the "current schema" programmaticall y (C++, if it matters)? I've tried both "SQL_ATTR_CLISC HEMA" and "SQL_ATTR_CURRE NT_SCHEMA" via "SQLSetConnectA ttr()" to no avail (I've verified that the chosen schema was properly set via "SQLGetConnectA ttr"() as well). The schema would "set", but it never seemed to affect any queies (I set it to something invalid, but could still query the tables as if the schema was correct).
I could prepend the schema name to every table reference in every SQL statement in our application, but obviously, I'd prefer to avoid that.
It seems that the schema name is the same as the user name, and I'd like to be able to change that within the application, but nothing seems to affect it.
Just to be clear, I'm looking for a way to perform "set schema XXX" from within our application.
Thanks very much for your time and any info...
I could prepend the schema name to every table reference in every SQL statement in our application, but obviously, I'd prefer to avoid that.
It seems that the schema name is the same as the user name, and I'd like to be able to change that within the application, but nothing seems to affect it.
Just to be clear, I'm looking for a way to perform "set schema XXX" from within our application.
Thanks very much for your time and any info...
Comment