How to get Linux ANSI ODBC driver for EDS?

Solution Verified - Updated -

Environment

  • Red Hat JBoss Data Services (EDS) 5.3.1
  • PostgreSQL ODBC Driver for Linux

Issue

  • After installing RHEL version of PostgreSQL ODBC driver, we are able to connect to VDB in JBoss EDS 5.3.1 but running any queries throws below error message:
[ODBC lib] Unicode converter truncated character
  • Our application needs the ANSI ODBC driver instead of Unicode, Windows has both of these PosgreSQL ODBC drivers, how do I get the ANSI version for Linux?

Resolution

Red Hat only packages the Unicode compiled Linux driver, you would need to download and build your own from the PostgreSQL ODBC site using the --disable-unicode option on the configure:

  • Download the driver source from: http://www.postgresql.org/ftp/odbc/versions/src/psqlodbc-08.04.0200.tar.gz
    Basic build steps are at: http://www.postgresql.org/docs/6.4/static/odbc18456.htm and http://psqlodbc.projects.pgfoundry.org/docs/unix-compilation.html

In the build directory, do the following:
1. ./configure --disable-unicode --without-libpq
2. make
(Expect lots of warnings, but the driver will build.)

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

1 Comments

We tried to compile PostgreSQL driver but it got failed with below error. checking for a BSD-compatible install... /bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 configure: using /usr/include /usr/lib checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking how to print strings... printf checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by gcc... /bin/ld checking if the linker (/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /bin/nm -B checking the name lister (/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop checking for /bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... dlltool checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... no checking for strip... strip checking for ranlib... ranlib checking command to parse /bin/nm -B output from gcc object... failed checking for sysroot... no checking for mt... no checking if : is a manifest tool... no checking how to run the C preprocessor... /lib/cpp configure: error: in /home/ptashraf/psqlodbc9/psqlodbc-09.03.0100': configure: error: C preprocessor "/lib/cpp" fails sanity check Seeconfig.log' for more details What may be the wrong in the system. Kindly advice.