ODBC Database Setup

Questions about Wine on Linux
Locked
Titan91
Level 2
Level 2
Posts: 36
Joined: Sat Jun 18, 2016 1:24 pm

ODBC Database Setup

Post by Titan91 »

I'm trying to get an old obscure accounting program running in WINE 1.9.20. It's called Bookkeeper by SoftCon from 2005. I created a fresh Windows XP prefix. The program installs fine but when I launch it I get:

Code: Select all

SQLSTATE = IM002 [unixODBC][Driver Manager]Data source name not found, and no default driver specified
in the terminal and it shows in an error window in the program. Did some research and came across https://www.winehq.org/docs/wineusr-gui ... ure#AEN962, and installed mdac28 via winetricks. Now I get the same error, but instead of "unixODBC" I get "Microsoft" since I am using the Microsoft driver now. What else do I need to do to configure the database? Should the program be asking to install this during setup? I'm not seeing any of the EXEs mentioned in windows/system from the article.
Titan91
Level 2
Level 2
Posts: 36
Joined: Sat Jun 18, 2016 1:24 pm

Re: ODBC Database Setup

Post by Titan91 »

Any ideas?
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: ODBC Database Setup

Post by Bob Wya »

Titan91 wrote:Any ideas?
Hiya Titan91,
  • What Linux distribution are you using?
  • Have you checked if you have the full unixODBC multilib package installed - if you are using a 64-bit distribution (typical these days)?
    I think that's an optional wine package dependency for Ubuntu...
Can you re-test your application in a clean 32-bit Wineprefix (if you are using a 64-bit distribution) - once you've checked your unixODBC installation?
See WineHQ FAQ: WineHQ FAQ: 6.5.3 How do I create a 32 bit wineprefix on a 64 bit system?

Then you'd want to launch your Windows application with:

Code: Select all

export WINEDEBUG=+odbc32
wine <something.exe> &>console_log.txt
Then post the console log inline (here - in a forum reply).
See WineHQ FAQ: 10.1.1 How can I get a debugging log (a.k.a. terminal output)?

Ta
Bob
Titan91
Level 2
Level 2
Posts: 36
Joined: Sat Jun 18, 2016 1:24 pm

Re: ODBC Database Setup

Post by Titan91 »

Bob Wya wrote:
Titan91 wrote:Any ideas?
Hiya Titan91,
  • What Linux distribution are you using?
  • Have you checked if you have the full unixODBC multilib package installed - if you are using a 64-bit distribution (typical these days)?
    I think that's an optional wine package dependency for Ubuntu...
Can you re-test your application in a clean 32-bit Wineprefix (if you are using a 64-bit distribution) - once you've checked your unixODBC installation?
See WineHQ FAQ: WineHQ FAQ: 6.5.3 How do I create a 32 bit wineprefix on a 64 bit system?

Then you'd want to launch your Windows application with:

Code: Select all

export WINEDEBUG=+odbc32
wine <something.exe> &>console_log.txt
Then post the console log inline (here - in a forum reply).
See WineHQ FAQ: 10.1.1 How can I get a debugging log (a.k.a. terminal output)?

Ta
Bob
Thanks for the tip Bob. No, I am not sure how to check that, from what I can gather on Google I need to have the ODBC driver installed before installing unixODBC. I'm on Linux Mint 18 MATE x64, forgot to mention that earlier. I am assuming the ODBC driver is installed but not unixODBC. From this site, where do I need to extract the files to? Or do I need to install it a different way to use it with WINE?

http://www.unixodbc.org/
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: ODBC Database Setup

Post by Bob Wya »

Titan91 wrote: Thanks for the tip Bob. No, I am not sure how to check that, from what I can gather on Google I need to have the ODBC driver installed before installing unixODBC. I'm on Linux Mint 18 MATE x64, forgot to mention that earlier. I am assuming the ODBC driver is installed but not unixODBC. From this site, where do I need to extract the files to? Or do I need to install it a different way to use it with WINE?

http://www.unixodbc.org/
You need to install the base unixodbc package, an odbc driver package and a database. On Gentoo that might be:

Code: Select all

*  dev-db/unixODBC
      Latest version available: 2.3.2-r1
      Latest version installed: 2.3.2-r1
      Size of files: 1,806 KiB
      Homepage:      http://www.unixodbc.org/
      Description:   A complete ODBC driver manager
      License:       GPL-2 LGPL-2.1

*  dev-db/myodbc
      Latest version available: 5.2.7-r1
      Latest version installed: [ Not Installed ]
      Size of files: 593 KiB
      Homepage:      http://www.mysql.com/products/myodbc/
      Description:   ODBC driver for MySQL
      License:       GPL-2

*  dev-db/mariadb
      Latest version available: 10.1.20
      Latest version installed: [ Not Installed ]
      Size of files: 60,171 KiB
      Homepage:      http://mariadb.org/
      Description:   An enhanced, drop-in replacement for MySQL
      License:       GPL-2
I'll leave that as an exercise for you to get the equivalent packages - on Ubuntu! There's plenty of support sites for dealing with Ubuntu related problems - e.g. AskUbuntu - after all...

Wine will interface to the main odbc library, which is setup to use a single odbc database driver, which then talks to the actual database!

The Arch Wiki: Open Database Connectivity (ODBC) covers the setup process in the "right" amount of detail (i.e. not too much). The Wiki page has a link to an Open Office MySQL setup document (pdf) - for the database application in that office suite. Looks quite readable.

Full disclaimer... I haven't tried setting up wine with an odbc connection before - but it should be a fun little project to get it working on your system! 8)

Bob
Locked