Skip site navigation (1) Skip section navigation (2)

unixODBC,, and Wine...

From: Raiford(at)labware(dot)com
To: pgsql-odbc(at)postgresql(dot)org
Subject: unixODBC,, and Wine...
Date: 2010-01-21 22:00:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
I have been beating my head over this all day and I'm not turning anything 
up at Google.  I'm basically trying to get an ODBC app to run in Wine and 
use the PostgreSQL ODBC driver configured in unixODBC.  Here is a brief 
rundown of my problem:

First, to prove I have unixODBC set up properly:

  * Run /usr/bin/odbctest
  * Select the Conn -> Full Connect ... menu item
  * Select my Data Source, enter a User and Password, and click OK
  * "Full Connect Succeeded" is displayed (yay!)

** Note that this works regardless of whether I choose the ANSI or Unicode 
ODBC driver.

Now, from within Wine, I run a very similar test:

   * Run Unicode ODBCTEST.EXE from
   * Select the Conn -> Full Connect ... menu item
   * Select my Data Source, enter the exact same User and Password, and 
click OK
   * This fails with the text "[unixODBC]c"

** Note that I can connect via Wine if I use the ANSI ODBC driver, but 
when I try to access a Unicode Postgres database, there are errors that 
invalid data types are being used

Everything looks correct in the ODBC tracing output.  I've tried a few 
other scenarios, but this is the most direct test case to show you.  In 
all cases, the Unicode driver only passes a single character back to the 
app running under Wine.  I have been trying to turn on Postgres specific 
logging, but I can't seem to figure out how.  I also considered that maybe 
the Unicode encoding between Wine and unixODBC may be a problem, but I 
didn't see any way to check or change this.

Please help!  I'm willing to put more effort in to document this better. 
At this point I'm not sure if its a Postgres error, unixODBC error, or a 
Wine error.  Doing this exact same test with FreeTDS and MDBTools had 
errors as well, although the connections did succeed.

I'm running 32-bit Ubuntu 9.10 (Karmic).  I have updated Wine to the 
latest available in the Wine PPA with no change in behavior.



pgsql-odbc by date

Next:From: the6campbellsDate: 2010-01-21 22:21:26
Subject: Re: unixODBC,, and Wine...
Previous:From: Jan-Peter SeifertDate: 2010-01-21 18:14:35
Subject: buffer overflow in 08.04.0100 und 08.04.0200?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group