-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue while connecting to IBM DB2 server, using loopback4 framework and loopback-connector-db2 #161
Comments
I'm not a DB2 expert but judging by the error message, it seems like you don't have the table name "username.WiusrappPersonV1". Perhaps the schema name of that table is |
Thanks @dhmlau As mentioned on the issue #2504, I use dsn property to provide the DB2 server details, where I do mention the schema name .. Yes correct the schema name of the table is My datasource is as below
|
In the |
@dhmlau :
I have also shown a screenshot of DBeaver image, where you can see the table exist on the database ![]() Why UID name is getting appended on the query instead of schema name ? Is this something similar to the issue documented on #145 |
After researching, I found out that I was referring the schema name incorrectly on the dsn string. It seems, in the dsn string on the datasource.ts, we need to mention the schema name against The correct property name in the DSN string is
It would be better, if we have this updated on the documentation. I will open up a new Pull request for the documentation update. Thank you You can close the issue. Thanks for your help |
My dependencies
Steps to reproduce
lb4 app
lb4 datasource <>. ---- Choose IBM Db2 (for Linux, Unix, Windows) (supported by StrongLoop) and also use dsn instead of individual values
lb4 repository
lb4 controller
Current Behavior
When you run
npm start
, the application starts, when you hit any of the endpoint, where you have the logic to have database interactions, it errors out even on create / count methods. Any interaction is failing.await this.wiusrappPersonV1Repository.create({"PROFILE_ID": "abc123"})
I see an error on my console saying
await this.wiusrappPersonV1Repository.create({"PROFILE_ID": "abc123"})
.then(x => console.log('hey', x))
.catch(err => console.log('err', err))
However, I can confirm that the db2 system has the table
TESTSHANKAR
, which is configured or mapped on the modelExpected Behavior
The DB2 connection isn't getting established.
Additional information
I did check some existing issues for the error message, and followed the solution but not working
loopbackio/loopback-next#2504
Related Issues
I did find this issue matching to my problem, and I used that solution but still getting the same problem
loopbackio/loopback-next#2504
The text was updated successfully, but these errors were encountered: