LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Wine + unixODBC + Easysoft ODBC-Sybase Driver (https://www.linuxquestions.org/questions/programming-9/wine-unixodbc-easysoft-odbc-sybase-driver-880365/)

japega 05-12-2011 01:45 PM

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.

business_kid 05-15-2011 03:31 AM

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

japega 05-15-2011 11:40 PM

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.

Easysoft Support 05-17-2011 09:42 AM

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

japega 05-17-2011 09:56 AM

Thanks for your replay.

I will try that.

Best regards.

TallTed 05-18-2011 02:41 PM

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

japega 05-18-2011 03:26 PM

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.

japega 06-20-2011 02:07 PM

Quote:

Originally Posted by business_kid (Post 4356735)
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...


business_kid 06-21-2011 02:50 AM

Quote:

Originally Posted by business_kid (Post 4356735)
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).


All times are GMT -5. The time now is 07:13 AM.