使用 OdbcConnection 连接到 iSeries:提示密码
我想使用 iSeries 客户端访问驱动程序连接到数据库。 我使用以下连接字符串:
DRIVER=客户端访问 ODBC 驱动程序(32 位);QUERYTIMEOUT=0;PKG=QGPL/DEFAULT(IBM),2,0,1,0,512;LANGUAGEID=ENU;DFTPKGLIB=QGPL;DBQ= QGPL XXXXXXX;SYSTEM=XXX.XXXXXXX.XXX;Signon=2
连接时出现异常:
错误 [28000] [IBM][iSeries Access ODBC Driver]通信链接失败。 comm rc=8015 - CWBSY1006 - 用户 ID 无效,密码长度 = 0,提示模式 = 从不
如何让应用程序提示用户输入数据库凭据?
I want to connect to DB using the iSeries Client Access driver. I use the following connection string:
DRIVER=Client Access ODBC Driver (32-bit);QUERYTIMEOUT=0;PKG=QGPL/DEFAULT(IBM),2,0,1,0,512;LANGUAGEID=ENU;DFTPKGLIB=QGPL;DBQ=QGPL
XXXXXXXX;SYSTEM=XXX.XXXXXXX.XXX;Signon=2
I get an exception when connecting:
ERROR [28000] [IBM][iSeries Access ODBC Driver]Communication link failure. comm rc=8015 - CWBSY1006 - User ID is invalid, Password length = 0, Prompt Mode = Never
How can I make the application prompt the user for his credentials to the DB?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据应用程序的措辞,我认为这是一个桌面应用程序,而不是服务器应用程序。
如果您可以使用 ODBC 数据源管理器中的 ODBC 设置,则可以将其设置为使用 iSeries 访问的默认设置。
否则,您可能必须在应用程序中提示输入用户名和密码,然后将其传递到连接字符串中。
I presume that this is a desktop application and not a server application based on the wording of the application.
If you could make use of the ODBC setup within the ODBC Data Source Administrator, that can be set to use the default setup of iSeries access.
Otherwise, you might have to prompt for the username and password within the application then pass that into the connection string.
下面是如何从 Excel 建立到 iSeries 的 ODBC 连接的快速示例。 如果尚未建立连接,它将提示输入用户名和密码。 您需要在客户端上安装 iSeries Navigator(也称为客户端访问)ODBC 驱动程序。
Here's a quick example of how to make an ODBC connection to an iSeries from Excel. It'll prompt for a username and password if it doesn't already have a connection. You'll need the iSeries Navigator (aka client access) ODBC driver installed on the client.