如何在 Perl 中优雅地从 odbc.ini 获取密码和用户名
ODBC 驱动程序 api 在 C/C++ 中有一个函数 SQLGetPrivateProfileString。我可以使用它从 odbc.ini 获取用户名和密码并连接到数据库。
但是对于perl DBI模块,没有这样的功能,我必须直接读取文件,不推荐。 有什么好的解决办法吗?谢谢。
ODBC driver api has a function SQLGetPrivateProfileString in C/C++.I can use it to get the username and password from odbc.ini and connect to db.
But for perl DBI module, there are not any functions like this, I have to read the file directly and it's not recommended.
Is there any good solution? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论