Forum Discussion
cunderw
7 years agoCommunity Hero
Unless I am mistaken, schema is set per user at the database level, not by your connection so this isn't something you can do when connecting.
- Adagio7 years agoFrequent Contributor
Hi cunderw, I agree with that, but here I have some generic Id that has access to 15 different schemas. Unless there's a way to pass a parameter that tells which schema.table to query on, It's difficult to go to the actual schema.table.
I've used a different way to do this. Instead of passing the schema name in the connection string, I've parameterized schemaname in 'schemaname.table' in the sql queries. that works without any problems but I don't like it very much.
However, for DB2, I can pass the schema names in the connection string itself.
Thank you
Abhi