SQLGetPrivateProfileString失败 [英] SQLGetPrivateProfileString failed with
问题描述
在RHEL 6上键入命令:odbcinst -q -s,会收到以下错误消息:
Typing the command: odbcinst -q -s on RHEL 6, I get the following error message:
odbcinst: SQLGetPrivateProfileString failed with .
当我运行时,我的所有DSN也不显示:
All my DSN's are also not showing up when I run:
odbcinst -q -d
推荐答案
键入命令: env | grep'ODBC'
以检查 ODBCSYSINI
并设置 ODBCINI
变量。如果没有返回结果 - 您需要将变量添加到指向目录
的环境变量以及 odbc.ini
文件位于如下(在我的情况下,对于RHEL 6它位于
/ etc
- 其他人可能在 / usr / local / etc
):
Type the command: env |grep 'ODBC'
to check if the ODBCSYSINI
and the ODBCINI
variables are set. If no results are returned - you need to add the variables to the environment variable pointing to the directory
and the path to where the odbc.ini
file is located as follows (in my case for RHEL 6 it is located at /etc
- others may have it on /usr/local/etc
):
编辑〜\.bash_profile
以下行:
export ODBCSYSINI=/etc
export ODBCINI=/etc/odbc.ini
您很好!
这篇关于SQLGetPrivateProfileString失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!