Solved Schema setting for passthrough query

Kingz

Member
Local time
Today, 22:38
Joined
Mar 19, 2024
Messages
63
Hi,
I thought if I have a passthrough query and the query is written without a schema, I could add..

SET SCHEMA "XXX"

Before the query, but it doesn't work. I guess the syntax is DB2, and that I need the access syntax..

Any ideas anyone?

Thanks in advance,
Kingz
 
Before the query, but it doesn't work. I guess the syntax is DB2, and that I need the access syntax..
Pass-Through-Queries are passed from Access without any modifications or interpretations to the ODBC data source. So, using DB2 syntax there is correct and required.

The examples in the DB2 documentation for SET SCHEMA either show the statement with an equals sign and single quotes around the schema name or without an equals sign and no delimiters at all.
I suggest you try either:
SET SCHEMA = 'XXX';
or
SET SCHEMA XXX;

If this doesn't lead to the desired result, please clarify what "it doesn't work" means exactly.
 
Works! Thanks.. It was the latter.. Just the semicolon missing.
 

Users who are viewing this thread

Back
Top Bottom