You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When depend on both the "github.com/alexbrainman/odbc" and "github.com/ibmdb/go_ibm_db" packages simultaneously, there is a probability of encountering an error when connecting to a DB2 database: panic: SQLGetDiagRec failed: ret = -2.
After I removed the dependency on "github.com/alexbrainman/odbc", every execution could perform queries correctly.
The text was updated successfully, but these errors were encountered:
What puzzles me is that this error doesn't occur every time; instead, it happens sporadically.
NingQue0920
changed the title
SQLGetDiagRec failed : ret = -2
SQLGetDiagRec failed : ret = -2 when import odbc and go_ibm_db at the same time
Jan 21, 2025
@NingQue0920 ,
The issue not reproduceable in my environment. But I am getting different errors related /alexbrainman/[email protected] package.
The issue could be because of github.com/alexbrainman/odbc and github.com/ibmdb/go_ibm_db packages has same api's names.
Import either alexbrainman/odbc or ibmdb/go_ibm_db package.
Thanks.
@NingQue0920 , The issue not reproduceable in my environment. But I am getting different errors related /alexbrainman/[email protected] package.这个问题在我的环境中无法再现。但是我遇到了不同的错误 / Alexbrainman / [email protected]包装。 The issue could be because of github.com/alexbrainman/odbc and github.com/ibmdb/go_ibm_db packages has same api's names.问题可能是因为github.com/alexbrainman/odbc和github.com/ibmdb/go_ibm_db软件包具有相同的API名称。 Import either alexbrainman/odbc or ibmdb/go_ibm_db package.导入Alexbrainman/ODBC或IBMDB/GO_IBM_DB软件包。 Thanks. 谢谢。
Yes, go_ibm_db and odbc has some same api's name , so I have to change one of them. You can change it and retry
go env
Output:Steps to Reproduce:
The text was updated successfully, but these errors were encountered: