SQLGetPrivateProfileString

Moderator: NorbertKrupa

Post Reply
tbradley1015
Newbie
Newbie
Posts: 4
Joined: Mon Oct 29, 2012 6:33 pm

SQLGetPrivateProfileString

Post by tbradley1015 » Tue Oct 30, 2012 8:00 pm

I've seen the few threads about NoSQLGetPrivateProfileString messages but I think I have a different issue. I'm trying to establish an odbc connection from a perl script and it's failing with this error.

[Vertica][ODBC] (11560) Unable to locate SQLGetPrivateProfileString function

I had the other issue about not finding the message for the en_US locale but that was fixed with the vertica.ini file. So it's finding the message in ODBCMessages.xml but i don't know why its actually throwing that error. Any ideas about this one?

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: SQLGetPrivateProfileString

Post by id10t » Tue Oct 30, 2012 10:00 pm

Hi!

>> I have a different issue
No, you have same issue - odbc driver do not know where error messages are.

>> I had the other issue about not finding the message for the en_US locale
vertica.ini should solve this issue but the problem not in LOCALE, problem in ErrorMessagesPath.
You should define path to ODBCMessages.xml (which is error messages file) in connection string.

tbradley1015
Newbie
Newbie
Posts: 4
Joined: Mon Oct 29, 2012 6:33 pm

Re: SQLGetPrivateProfileString

Post by tbradley1015 » Wed Oct 31, 2012 4:18 pm

Its definitely finding ODBCMessages.xml because I added XXX to the message text in the file and now its displaying the text that I changed.

DBI connect('TCCVRTS1','',...) failed: [unixODBC][Vertica][ODBC] (11560) Unable to locate XXXSQLGetPrivateProfileString function. (SQL-HY000) at tom_vertica.pl line 87

Any other suggestions?

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: SQLGetPrivateProfileString

Post by JimKnicely » Thu Nov 01, 2012 6:53 pm

Hi,

Did you set up the VERTICAINI environment variable?

Thanks!
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

tbradley1015
Newbie
Newbie
Posts: 4
Joined: Mon Oct 29, 2012 6:33 pm

Re: SQLGetPrivateProfileString

Post by tbradley1015 » Fri Nov 02, 2012 4:27 pm

VERTICAINI is set.

ux411:/mks/tcc/ort/bin/shell > more $VERTICAINI
[Driver]
Locale = en_US
ODBCInstLib = /apps/local/unixODBC/lib/libodbcinst.so.1
ErrorMessagesPath = /apps/vertica/odbc/lib64/
DriverManagerEncoding = UTF-8
LogPath = /tmp
LogLevel = 7

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: SQLGetPrivateProfileString

Post by JimKnicely » Fri Nov 02, 2012 4:54 pm

Hi,

Here's my ini file:

[root@HADOOPTST01 jknicely]# cat /etc/vertica.ini
[Driver]
DriverManagerEncoding=UTF-16
ODBCInstLib=/usr/lib64/libodbcinst.so
ErrorMessagesPath=/opt/vertica/lib64
LogLevel=4
LogPath=/tmp

Are you sure about the ErrorMessagesPath setting in your ini file?
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

tbradley1015
Newbie
Newbie
Posts: 4
Joined: Mon Oct 29, 2012 6:33 pm

Re: SQLGetPrivateProfileString

Post by tbradley1015 » Fri Nov 09, 2012 10:08 pm

Thanks all. The problem was the wrong directory for the odbclib

I had the 32bit version. Once I changed it to the 64bit version everything is ok.

ODBCInstLib = /apps/local/unixODBC_64/lib/libodbcinst.so.1

Post Reply

Return to “ODBC”