Wine + PowerBuilder + Sybase ODBC
Wine + PowerBuilder + Sybase ODBC
Hi there,
I'm having a PowerBuilder aplication that connects to a Sybase data base through an ODBC. The application works fine on Windows, but I want to make it run on a Mandriva 2010.2 distribution.
The fact is, I could run it on a machine with Mandriva 2010.2, but now I want to do an installation from scratch to another computer, but it does't work.
The kernel version that I'm using is: 2.6.33.7-desktop-2mnb
The version of Wine on the computer that works is: 1.2.rc4
The version of Wine on the computer that doesn't work is: 1.3.22
This is what I have done on the PC that works:
I have installed Wine 1.2-rc4, SQL Anywhere 12.0.1 for Windows on Wine, to get a Sybase driver for Wine, SQL Anywhere 12.0.1 for Linux to get the engine where the fisical data base runs.
I run SQL Anywhere 12 Network Server (dbsrv12), that handles the fisical database file (xxx.db).
With a odbcad32.exe I make on ODBC that do a "Network Connection" to localhost with the parameters that it needs. When I do a "Test Connection" I get the message "Conection Successful".
When I execute the PowerBuilder Application, everything seems to be right. I can use the program and see the data base information.
I do the same on the PC that don't work, with the Wine version difference. And when I do the "Test Connection", I get the same message: "Connection Successful", but when I execute the PowerBuilder Application I get an error message about the connection with the ODBC.
Obviously, I have the same copy of the PowerBuilder application on bouth machines.
I know that I can do a ODBC with unixODBC, but when I have tried this with a Sybase driver fot Linux, I can't get it work even on Linux.
Could anyone help me know what is missing from the PC that does not work?
I'm having a PowerBuilder aplication that connects to a Sybase data base through an ODBC. The application works fine on Windows, but I want to make it run on a Mandriva 2010.2 distribution.
The fact is, I could run it on a machine with Mandriva 2010.2, but now I want to do an installation from scratch to another computer, but it does't work.
The kernel version that I'm using is: 2.6.33.7-desktop-2mnb
The version of Wine on the computer that works is: 1.2.rc4
The version of Wine on the computer that doesn't work is: 1.3.22
This is what I have done on the PC that works:
I have installed Wine 1.2-rc4, SQL Anywhere 12.0.1 for Windows on Wine, to get a Sybase driver for Wine, SQL Anywhere 12.0.1 for Linux to get the engine where the fisical data base runs.
I run SQL Anywhere 12 Network Server (dbsrv12), that handles the fisical database file (xxx.db).
With a odbcad32.exe I make on ODBC that do a "Network Connection" to localhost with the parameters that it needs. When I do a "Test Connection" I get the message "Conection Successful".
When I execute the PowerBuilder Application, everything seems to be right. I can use the program and see the data base information.
I do the same on the PC that don't work, with the Wine version difference. And when I do the "Test Connection", I get the same message: "Connection Successful", but when I execute the PowerBuilder Application I get an error message about the connection with the ODBC.
Obviously, I have the same copy of the PowerBuilder application on bouth machines.
I know that I can do a ODBC with unixODBC, but when I have tried this with a Sybase driver fot Linux, I can't get it work even on Linux.
Could anyone help me know what is missing from the PC that does not work?
- SpawnHappyJake
- Level 5
- Posts: 272
- Joined: Sun Feb 06, 2011 5:57 am
Copy and Paste?
What happens if you copy the prefix folder over? That would prove if it is a WINE version regression of the WINE program itself, or if it's "just" a registry value or dll or something like that that needs to be tweaked.
What I mean is, on the Linux installation that it is working in, if you copy the working WINE prefix folder (folder you installed the program into, by default a folder named ".wine" in your home folder) over to this other machine, and renamed the folder to, say, "PowerBuilder", and ran the program out of that prefix by specifying "WINEPREFIX=[path to PowerBuilder prefix folder]", would it work then? You'd just go to terminal and enter "WINEPREFIX=[path to PowerBuilder prefix folder] wine [path to PowerBuilder executable, or whatever it is that you run]". If it works, you can make a launcher that does all that for you so you can run it with a simple double-click.
Cheers,
Jake[/list]
What I mean is, on the Linux installation that it is working in, if you copy the working WINE prefix folder (folder you installed the program into, by default a folder named ".wine" in your home folder) over to this other machine, and renamed the folder to, say, "PowerBuilder", and ran the program out of that prefix by specifying "WINEPREFIX=[path to PowerBuilder prefix folder]", would it work then? You'd just go to terminal and enter "WINEPREFIX=[path to PowerBuilder prefix folder] wine [path to PowerBuilder executable, or whatever it is that you run]". If it works, you can make a launcher that does all that for you so you can run it with a simple double-click.
Cheers,
Jake[/list]
Re: Copy and Paste?
I have do exactly what you say and it works!SpawnHappyJake wrote:What happens if you copy the prefix folder over? That would prove if it is a WINE version regression of the WINE program itself, or if it's "just" a registry value or dll or something like that that needs to be tweaked.
What I mean is, on the Linux installation that it is working in, if you copy the working WINE prefix folder (folder you installed the program into, by default a folder named ".wine" in your home folder) over to this other machine, and renamed the folder to, say, "PowerBuilder", and ran the program out of that prefix by specifying "WINEPREFIX=[path to PowerBuilder prefix folder]", would it work then? You'd just go to terminal and enter "WINEPREFIX=[path to PowerBuilder prefix folder] wine [path to PowerBuilder executable, or whatever it is that you run]". If it works, you can make a launcher that does all that for you so you can run it with a simple double-click.
Cheers,
Jake[/list]
I copied the entire .wine folder from the PC that it works, and paste it on the home user folder in the PC that not works, but with an other name, as you suggested. Then, I have executed the windows application with the WINEPREFIX enviroment variable and it works fine.
I guess there is some Windows libraries that the Wine instalation on the PC that works has, and the other doesn't. If I'm right, I can try to find the libraries and copy it to the .wine default directory.
- SpawnHappyJake
- Level 5
- Posts: 272
- Joined: Sun Feb 06, 2011 5:57 am
That's Great! Ready for Part 2?
I'm really, really happy that it worked! That's great!
But if you want to take it to the next level, the next thing is to figure out what is different between the working and non-working prefixes and make an AppDB entry saying how to make it go.
I don't know if you want to go there or not, but that's the next step, and it would help other people trying to get PowerBuilder to work in WINE.
Cheers,
Jake
But if you want to take it to the next level, the next thing is to figure out what is different between the working and non-working prefixes and make an AppDB entry saying how to make it go.
I don't know if you want to go there or not, but that's the next step, and it would help other people trying to get PowerBuilder to work in WINE.
Cheers,
Jake
Re: That's Great! Ready for Part 2?
Actually that is what I'm trying to do. Knowing exactly what the differences are and know what is really needed to make it work.
I found the difference of files in the system32 directory. I copied one by one, but when I try to run the application did not work. But if I copy the entire directory, the application works.
I'm trying to find what exactly what makes it work. Any suggestions?
I found the difference of files in the system32 directory. I copied one by one, but when I try to run the application did not work. But if I copy the entire directory, the application works.
I'm trying to find what exactly what makes it work. Any suggestions?
- SpawnHappyJake
- Level 5
- Posts: 272
- Joined: Sun Feb 06, 2011 5:57 am
Now the fun part!
Oh goodie! WhatChanged and RegShot will be your friends. I have to get in bed soon, though. More on this later?
Cheers,
Jake
P.S KEEP THE ORIGINAL, UNMODIFIED PREFIXES. Copy them, then do what you want to the copies.
Cheers,
Jake
P.S KEEP THE ORIGINAL, UNMODIFIED PREFIXES. Copy them, then do what you want to the copies.
- SpawnHappyJake
- Level 5
- Posts: 272
- Joined: Sun Feb 06, 2011 5:57 am
Some More Details
RegShot and WhatChanged are both free, but only RegShot is open source.
RegShot takes snapshots of the registry and compares them, telling you the registry values and keys that have been added, removed, and modified going from the first snapshot to the second. You can save snapshots of the registry with it to *.hiv files.
You can run RegShot in one prefix, get the *.hiv, save it, run RegShot in the other prefix, save the snapshot *.hiv file, and have RegShot compare the two. That will show any registry differences.
Maybe you can make a script that shows the differences between two directories: http://www.astahost.com/info.php/Bash-S ... 19548.html
Cheers,
Jake
RegShot takes snapshots of the registry and compares them, telling you the registry values and keys that have been added, removed, and modified going from the first snapshot to the second. You can save snapshots of the registry with it to *.hiv files.
You can run RegShot in one prefix, get the *.hiv, save it, run RegShot in the other prefix, save the snapshot *.hiv file, and have RegShot compare the two. That will show any registry differences.
Maybe you can make a script that shows the differences between two directories: http://www.astahost.com/info.php/Bash-S ... 19548.html
Cheers,
Jake
Thanks a lot. I will try that RegShot, it looks very insteresting.
Actually, I have solved the problem. But it's kind of tricky. I found that some libraries of the PC that works, in the system32 directory has a diferent size, especially on the odbc libraries.
Lets call "PC1" to the machine that works, and "PC2" the machine that doesn't.
I saw that the odbc32.dll library on the PC1 has 1,040 kb and the same file on the PC2 has only 244 kb. Then, I copied some libraries from PC1 to PC2: odbcint.dll, odbccp32.dll, odbc32.dll and dblgen9.dll. And that's it, the application works. I ignore the diference between this two files, I mean, internally, but it works. The odbc32.dll with 1,040 kb, is the Wine default file and the other one is from a Windows XP machine, where the application works fine. I'm not sure if the application works copying only the odbc32.dll library.
I looked on this kind of libraries because the error on the Wine application says that doesn't find the odbc data source. It was a hunch.
Cheers.
Actually, I have solved the problem. But it's kind of tricky. I found that some libraries of the PC that works, in the system32 directory has a diferent size, especially on the odbc libraries.
Lets call "PC1" to the machine that works, and "PC2" the machine that doesn't.
I saw that the odbc32.dll library on the PC1 has 1,040 kb and the same file on the PC2 has only 244 kb. Then, I copied some libraries from PC1 to PC2: odbcint.dll, odbccp32.dll, odbc32.dll and dblgen9.dll. And that's it, the application works. I ignore the diference between this two files, I mean, internally, but it works. The odbc32.dll with 1,040 kb, is the Wine default file and the other one is from a Windows XP machine, where the application works fine. I'm not sure if the application works copying only the odbc32.dll library.
I looked on this kind of libraries because the error on the Wine application says that doesn't find the odbc data source. It was a hunch.
Cheers.
- SpawnHappyJake
- Level 5
- Posts: 272
- Joined: Sun Feb 06, 2011 5:57 am
Whoa! Smartness!
You people are just plain smart!
The AppDB doesn't mention any winetricks for PowerBuilder at time of writing.
So Japegamx, it would be swell if you made a new WINE prefix, did "env WINEPREFIX=[path to new prefix] sh [path to winetricks script] mdac27" then installed PowerBuilder to the new prefix and see if ONLY THAT makes it work.
Then you can tell the AppDB that all you need to do is "winetricks mdac27" to make it work. It could really use it.
Cheers,
Jake
P.S Just compiled WINE 1.3.23 from source. Let's hope it works.
The AppDB doesn't mention any winetricks for PowerBuilder at time of writing.
So Japegamx, it would be swell if you made a new WINE prefix, did "env WINEPREFIX=[path to new prefix] sh [path to winetricks script] mdac27" then installed PowerBuilder to the new prefix and see if ONLY THAT makes it work.
Then you can tell the AppDB that all you need to do is "winetricks mdac27" to make it work. It could really use it.
Cheers,
Jake
P.S Just compiled WINE 1.3.23 from source. Let's hope it works.
I didn't try to install mdac27.exe through winetricks.
I made everything from scratch. Install Mandriva 2010.2 again, Wine, SQL Anywhere 12 for both (Linux & Wine), and then, install mdac27.exe with winetricks. Copy the Powerbuilder application files to its destiny and when I run it, Works just fine! Even faster!
I don't try this before because I didn't know that mdac27.exe going to fix the problem.
Thanks a lot.
I made everything from scratch. Install Mandriva 2010.2 again, Wine, SQL Anywhere 12 for both (Linux & Wine), and then, install mdac27.exe with winetricks. Copy the Powerbuilder application files to its destiny and when I run it, Works just fine! Even faster!
I don't try this before because I didn't know that mdac27.exe going to fix the problem.
Thanks a lot.
- SpawnHappyJake
- Level 5
- Posts: 272
- Joined: Sun Feb 06, 2011 5:57 am
Good Job! Do We Have Gold?
Good job everybody! Does it work flawlessly now? If so, that'd make it GOLD rated in the AppDB!
OP, you get the fine pleasure of adding this to the AppDB. In fact, it might be the first entry for this app above silver! That's an honor right there.
Cheers,
Jake
OP, you get the fine pleasure of adding this to the AppDB. In fact, it might be the first entry for this app above silver! That's an honor right there.
Cheers,
Jake
-
- Newbie
- Posts: 1
- Joined: Mon Jul 18, 2011 1:27 pm
Which PB Version?
Maybe I missed it, but could you tell us which version of PowerBuilder you are using?japegamx wrote:Sorry, I post that on spanish, hahahahhaa
I mean:
Everything seems to work fine. I am doing test of functionability on every module of the application.
I will post it on the AppDB
Thanks for everything.
Re: Which PB Version?
PowerBuilder 7... I tried to compile the application in PowerBuilder 6, but it doesn't works.aotheoverlord wrote:
Maybe I missed it, but could you tell us which version of PowerBuilder you are using?