LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-12-2011, 01:45 PM   #1
japega
Member
 
Registered: Mar 2006
Location: D.F., México
Distribution: Fedora
Posts: 42

Rep: Reputation: 15
Unhappy Wine + unixODBC + Easysoft ODBC-Sybase Driver


Hi there, I hope someone can help me.

First of all, I'm on Fedora 14 distribution and my kernel version is 2.6.35.13-91.fc14.i686.

We have a PowerBuilder aplication that runs on a Windows machines by now, but we want to migrate to Linux.

I have installed the application on Wine, but the application makes a conection to a database through an odbc on Windows, that's why I have installed unixODBC and Easysoft ODBC-Sybase Driver ().

After the Easysoft ODBC-Sybase Driver instalation I have configurated as it says on the documentation, but it doesn't work with that instructions. The documentation says that I have to put this parameters on .odbc.ini file, that is on /home/user/ (current user).

Quote:
[my_data_source]
Driver = SYBASE
Database = /home/user/data_base.db
User = dba
Password = xxxxx
And I have this on the /etc/odbcinst.ini file

Quote:
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/psqlodbc.so
Setup = /usr/lib/libodbcpsqlS.so
Driver64 = /usr/lib64/psqlodbc.so
Setup64 = /usr/lib64/libodbcpsqlS.so
FileUsage = 1

[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/libmyodbc5.so
Setup = /usr/lib/libodbcmyS.so
Driver64 = /usr/lib64/libmyodbc5.so
Setup64 = /usr/lib64/libodbcmyS.so
FileUsage = 1

[SYBASE]
Description = Easysoft ODBC Sybase Driver
Driver = /usr/local/easysoft/sybase/libessybase.so
Setup = /usr/local/easysoft/sybase/libessybasesetup.so
FileUsage = 1
But I'm only interested on the SYBASE section. The Easysoft ODBC-Sybase Driver is installed on /usr/local.

I check if the data source is available with execute

Quote:
$ odbcinst -s -q
[my_data_source]
When I want to test the conection with

Quote:
$ isql my_data_source -v dba xxxxx
I get the following error:

Quote:
Segmentation Violation (`core 'generated)
Then I have found on a webpage that I can add data sources to the .odbc.ini file with the dbdsn command. I have installed SQL Anywhere 10.0.1 and Interactive SQL too. I execute dbdsn with this paramates:

Quote:
$ dbdsn -w "my_data_source" -c "uid=dba;pwd=xxxxx;dbf=/home/user/data_base.db"
And I get this on the .odbc.ini file:

Quote:
[ODBC Data Sources]
my_data_source=SQLAnywhere 10.0

[my_data_source]
UserID=dba
Password=xxxxx
DatabaseFile=/home/user/data_dase.db
Driver=libdbodbc10.so
Obviously, I have deleted the other parameters that I had before. I tried to test the conection with isql I get this:

Quote:
$ isql my_data_source -v dba xxxxx
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect
But if I execute dbisql, I can conect with my_data_source ODBC source. Then, I think that the ODBC is ok, but I'm not sure, because the error message of isql.

I explain all this because I don't know if it has to do with the connection between Wine and the unixODBC.

I have found on this link, in the 4.3.6 point, about the LIB_ODBC_DRIVER_MANAGER enviroment variable and it's value, but I don't get to work the PowerBuilder application.

When I start the PowerBuilder application I get the fisrt error message, that it says that it can't do the conection with the ODBC source and I have tried diferent values for LIB_ODBC_DRIVER_MANAGER without success. Actually, I have it like this:

Quote:
$ echo $LIB_ODBC_DRIVER_MANAGER
/opt/sqlanywhere10/lib32/libdbodbc10.so
I think I have put all the necessary information. If in doubt, let me know.

Thanks.

Best regards.

Last edited by japega; 05-13-2011 at 03:36 PM.
 
Old 05-15-2011, 03:31 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
You can go at the core from the segmentation fault with gdb, but I'd take this direct to the wine guys and the unix obdc people.

Also learn a bit about WINEDEBUG variables. If you can guess at the area of issue, you can do something like

WINEDEBUG=+dll,+obdc wine your_program > some_file 2>&1

http://www.winehq.org/site/docs/wineusr-guide/x543
 
Old 05-15-2011, 11:40 PM   #3
japega
Member
 
Registered: Mar 2006
Location: D.F., México
Distribution: Fedora
Posts: 42

Original Poster
Rep: Reputation: 15
I tried with other ODBC, like MySQL. I created a MySQL ODBC and running with isql and it works perfectly. I think the problem is on the Sybase Easysoft driver, but I'm not sure yet. I sent an email to them to know more about it.

Thanks.
 
Old 05-17-2011, 09:42 AM   #4
Easysoft Support
LQ Newbie
 
Registered: May 2011
Posts: 1

Rep: Reputation: 0
Trying to Access SQLAnywhere 10 using Easysoft ODBC-Sybase Driver

Easysoft ODBC-Sybase

The Easysoft ODBC-Sybase Driver is an ODBC 3.5 driver for Sybase Adaptive Server Enterprise (ASE). It lets ODBC-enabled applications access Sybase ASE 12.5.x and 15+ (including Sybase ASE Express Edition) from Linux and major Unix platforms.

It can not access "SQLAnywhere 10.0".

Easysoft Support
 
Old 05-17-2011, 09:56 AM   #5
japega
Member
 
Registered: Mar 2006
Location: D.F., México
Distribution: Fedora
Posts: 42

Original Poster
Rep: Reputation: 15
Thanks for your replay.

I will try that.

Best regards.
 
Old 05-18-2011, 02:41 PM   #6
TallTed
LQ Newbie
 
Registered: May 2011
Posts: 3

Rep: Reputation: Disabled
If you still want to use SQLAnywhere 10...

You might try a driver from OpenLink Software (my employer) -- http://uda.openlinksw.com/odbc-sybase-st/

This same driver can be used against almost any Sybase or Microsoft SQL Server version -- http://bit.ly/fChjT4

Last edited by TallTed; 05-18-2011 at 02:42 PM. Reason: HTML markup didn't work as expected...
 
Old 05-18-2011, 03:26 PM   #7
japega
Member
 
Registered: Mar 2006
Location: D.F., México
Distribution: Fedora
Posts: 42

Original Poster
Rep: Reputation: 15
I have tried it, downloading the "Windows 98/XP/Vista/7 (32 bit) (x86)" version of the OpenLink Sybase Driver (from here), but I can't make the installation on Wine, because the installer doesn't find the license file, no matter what I choose on the "Select the license destination directory" section, it always says that the license file is not there and I'm sure that the file is on the directory location that I had selected.

What I need to do is an ODBC connection to a Sybase data base that runs on a Linux service, with SQL Anywhere for Linux o else, because we have a Windows application that we are migrating to Wine. I have done this already:

- Install SQL Anywhere 12.0.1 on Linux to make up the service on the Linux machine to the dabase file (*.db).
- Install SQL Anywhere 12.0.1 on Wine to have the Sybase driver on it.
- Create an ODBC source, on Wine, that connects to the Sybase Linux service.
- Run the Windows application with Wine and connect it through the ODBC.

This works just fine, but I think that I can replace the SQL Anywhere 12.0.1 Wine installation and use an other driver, like the OpenLink Sybase Driver, but, I have mencioned the issue about that. In fact, I have test the Open Link Sybase Driver on a native Windows machine and do the connection through the ODBC to the Linux service and it works, but I need all in the same computer.

Any suggestions are welcome.

Thanks for everything.

Thanks.
 
Old 06-20-2011, 02:07 PM   #8
japega
Member
 
Registered: Mar 2006
Location: D.F., México
Distribution: Fedora
Posts: 42

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by business_kid View Post
You can go at the core from the segmentation fault with gdb, but I'd take this direct to the wine guys and the unix obdc people.

Also learn a bit about WINEDEBUG variables. If you can guess at the area of issue, you can do something like

WINEDEBUG=+dll,+obdc wine your_program > some_file 2>&1

http://www.winehq.org/site/docs/wineusr-guide/x543
I have to do that and I get this:

Code:
trace:odbc:DllMain Initializing or Finalizing proxy ODBC: 0x7d6b0000,1,(nil)
trace:odbc:DllMain Loading ODBC...
trace:odbc:ODBC_LoadDriverManager 
trace:odbc:SQLAllocEnv 
trace:odbc:SQLAllocEnv Returns ret=0, Env=7c881890
trace:odbc:ODBC_ReplicateODBCInstToRegistry Driver settings are not currently replicated to the registry
trace:odbc:SQLDrivers 
trace:odbc:SQLDrivers 
trace:odbc:SQLDataSources EnvironmentHandle = 0x7c881890
trace:odbc:SQLDataSources returns: 100 	 Description = 
trace:odbc:SQLDataSources EnvironmentHandle = 0x7c881890
trace:odbc:SQLDataSources returns: 100 	 Description = 
trace:odbc:SQLFreeEnv (Env=7c881890)
trace:odbc:SQLFreeEnv Returns 0
trace:odbc:SQLAllocEnv 
trace:odbc:SQLAllocEnv Returns ret=0, Env=7c881890
trace:odbc:SQLAllocConnect Env=7c881890
trace:odbc:SQLAllocConnect Returns ret=0, Handle 7c881e20
trace:odbc:SQLDriverConnect 
trace:odbc:SQLError 
trace:odbc:SQLFreeEnv (Env=7c881890)
trace:odbc:SQLFreeEnv Returns -1
fixme:process:CreateProcessA StartupInfo.lpReserved is used, please report ("")
trace:odbc:DllMain Initializing or Finalizing proxy ODBC: 0x7d6b0000,0,0x1
trace:odbc:DllMain Unloading ODBC...
 
Old 06-21-2011, 02:50 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Quote:
Originally Posted by business_kid View Post
You can go at the core from the segmentation fault with gdb, but I'd take this direct to the wine guys and the unix obdc people.
If we're in this territopry, file the bug, and they will ask for a trace from the latest git of wine. As they know their way around that stuff pretty well, they will usually say what trace (WINEDEBUG variables) they want. Add this to the bug and it gets solved. You can also examine it for which dll is the crash in. Unimplemented functions are bugs. But you can specify a native dll there in winecfg (libraries).
 
  


Reply

Tags
fedora 14, odbc, unixodbc, wine



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
is it possible to use a Windows ODBC driver with unixODBC? eantoranz Linux - Software 2 07-19-2018 11:31 AM
sybase connection through odbc on redhat linux enterprise As4 kalidoss Linux - Software 2 11-07-2009 12:50 AM
how can i get the unixodbc odbc-sqlserver driver's license xiaomop Linux - Software 4 05-11-2009 12:37 AM
Need help installing Windows odbc driver in Wine txos Linux - Software 4 07-19-2007 04:34 PM
unixODBC and sybase eantoranz Programming 3 12-20-2005 01:54 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration