This is a kind of βdoubleβ question, which may have one answer.
I am working with Odbc Connection with AS / 400 with my connection string as follows:
driver={iSeries Access ODBC Driver}; system={0}; uid={1}; pwd={2}; DefaultLibraries=*USRLIBL;
I can connect to the system in order.
* USRLIBL contains all the necessary libraries from the user (which is of type "only API", which has access to all user libraries).
However, when I try to access some ERP libraries, he says that they cannot be found, while others can.
So, as an extremely simple walkthrough:
1. Open Connection - Query File 1 from Library A: OK! - Close Connection 2. Open Connection - Query File 2 from Library A: OK! - Close Connection 3. Open Connection - Query File 1 from Library B: Exception SQL0204 - in UserName type *FILE not found
Ok, so I added to the specific library that there would be ERP files by entering the connection string as follows to check the program:
driver={iSeries Access ODBC Driver}; system={0}; uid={1}; pwd={2}; DefaultLibraries=*USRLIBL, LibraryB;
But then I start to get another problem (another extremely basic walkthrough)
1. Open Connection - Query File 1 from Library A: OK! - Close Connection 2. Open Connection - Query File 2 from Library A: OK! - Close Connection 3. Open Connection - Query File 1 from Library B: OK! - Close Connection 4. Open Connection - Query File 1 from Library A again: Exception SQL0202 - in LibraryB type *FILE not found.
So my questions are:
Why doesn't it remove the binding string odbc DefaultLibraries = * USRLIBL, doesn't return the correct libraries? (Note: I also tested this with iDB2Connection, which actually works great ... however, iDB2Connection cannot be deployed because it literally crashes the server)
Why the second pass makes an exception, it just seems that it missed * USRLIBL after reading from LibraryB even once.
Any thoughts?
Start editing:
There are actually two users: DEV and PROD
* USRLIBL gets all the necessary libraries from the environment itself, so if, upon opening the connection, it detects the localhost environment or something that is unsafe (plus a few other caveats), by default it uses the DEV credentials before creating the connection. This is why the system, uid and pwd are designated as parameters in the connection (and not just I-dont-want-to-out-out storage placeholders),
USRLIBL then retrieves the required libraries from the user API.
To clarify, the way it is configured works using the iDB2 connector, but due to the limitations of our ERP system (we believe) using it with the IIS 7 server leads to a catastrophic failure, so we are working with the ODBC connector.
End edit: