Trying to make a Delphi database application run correctly

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
marcos_antonio_ps
Level 2
Level 2
Posts: 17
Joined: Mon Apr 20, 2009 8:05 am

Trying to make a Delphi database application run correctly

Post by marcos_antonio_ps »

Hello, everybody!

First of all I have to say that I'm already posted this question in another forum:

http://www.delphipages.com/threads/thre ... 9&G=206179

but as I haven't got any response from there I thought that this would be the right
place to ask what I asked there. I really hope to get your help about this because
I am totally new to Linux and I don't know where to go anymore.
If you read my question in the forum listed above you know that I'm trying to run
a Delphi database application developed in Windows using Wine.

That's what I'm using in the Windows side:

- Windows XP (Service Pack 3)
- Delphi 2005
- dbExpress (I'm not using BDE, which makes things simpler)
- MS SQL Server 2000

On Linux:

- Ubunto 8.10
- Wine 1.0.1

First my application wasn't connecting to the database, but I could make it connect
installing mdac28 with the winetricks script. All queries sent to the database in the
application are running ok, but when I try to write something I get the following error:

Database Server Error: [DBNETLIB][ConnectionRead (Error SIO_KEEPALIVE_VALS()).] General network error. Check your network documentation.

I changed the Windows version in Wine to Windows 98 and tried to install jet40 using
winetricks, but I'm getting an error. That's how I proceed and the error messages
that I get:

marcos@marcos:~$ sudo su

root@marcos:/home/marcos# sh winetricks jet40
Executing wine /root/.winetrickscache/jet40sp8_9xnt.exe
fixme:ntdll:find_reg_tz_info Can't find matching timezone information in the registry for bias 180, std (d/m/y): 0/00/0000, dlt (d/m/y): 0/00/0000
fixme:ntdll:find_reg_tz_info Can't find matching timezone information in the registry for bias 180, std (d/m/y): 0/00/0000, dlt (d/m/y): 0/00/0000
fixme:setupapi:extract_cabinet_file awful hack: extracting cabinet "C:\\windows\\temp\\IXP001.TMP\\Jetsetup.CAB"
err:ole:TLB_ReadTypeLib Loading of typelib L"C:\\Program files\\Common files\\Microsoft shared\\dao\\dao2535.tlb" failed with error 2
Install of jet40 done
winetricks done.

I want to to install jet40 just to try if the error that I'm getting in the application
will disappear, but I'm just guessing this.
I also want to tell you that I run my application using winefile.

I would be very thankful if someone could help me with this issue.

Thank you.

Marcos
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Trying to make a Delphi database application run correct

Post by vitamin »

marcos_antonio_ps wrote:- Wine 1.0.1
This is too old, upgrade.
marcos_antonio_ps wrote:marcos@marcos:~$ sudo su
marcos_antonio_ps wrote: DO NOT!!! run Wine as root!!!
marcos_antonio_ps
Level 2
Level 2
Posts: 17
Joined: Mon Apr 20, 2009 8:05 am

Re: Trying to make a Delphi database application run correct

Post by marcos_antonio_ps »

vitamin wrote:This is too old, upgrade.
Isn't Wine 1.0.1 the latest stable release? At least that's what the Wine site says.
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: Trying to make a Delphi database application run correct

Post by dimesio »

marcos_antonio_ps wrote:
vitamin wrote:This is too old, upgrade.
Isn't Wine 1.0.1 the latest stable release? At least that's what the Wine site says.
Yes, it is. It is also six months old. Development releases come out every two weeks.

I also suggest you clean up the mess you created by running Wine as root. http://wiki.winehq.org/FAQ#head-96bebfa ... 78b0d41014
marcos_antonio_ps
Level 2
Level 2
Posts: 17
Joined: Mon Apr 20, 2009 8:05 am

Re: Trying to make a Delphi database application run correct

Post by marcos_antonio_ps »

Hello, vitamin and dimesio. Thanks a lot for your replies. I see that I still have many
things to learn. I wasn't aware of things like that running Wine as root would
mess things. I'll fix that with the help of the FAQ. But I just would like to upgrade to a new version of Wine if there's really a good change that the version that I'm using now (the stable) is related with the error message that I'm getting. I wouldn't like to spend some time doing one thing that would not add any value and, as I'm still learning how to do things on Linux, increase the change to get in some troubles trying to update something. So, returning to the error when I try to write something in the application:

Database Server Error: [DBNETLIB][ConnectionRead (Error SIO_KEEPALIVE_VALS()).] General network error. Check your network documentation.

I see this message on the console when that error happens:

fixme:winsock:WSAIoctl unsupported WS_IOCTL cmd (98000004)

for the time being I'm running my application only with ODBC (mdac28). I also installed
a fake IE6, but I didn't know if this was necessary.

I really want to get rid of this error.

Marcos
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Trying to make a Delphi database application run correct

Post by vitamin »

marcos_antonio_ps wrote:But I just would like to upgrade to a new version of Wine if there's really a good change that the version that I'm using now (the stable) is related with the error message that I'm getting.
Upgrade then we'll talk. The "stable" version was guaranteed to run 4 apps.
marcos_antonio_ps
Level 2
Level 2
Posts: 17
Joined: Mon Apr 20, 2009 8:05 am

Re: Trying to make a Delphi database application run correct

Post by marcos_antonio_ps »

vitamin wrote:Upgrade then we'll talk. The "stable" version was guaranteed to run 4 apps.
Ok, I'll let you know when I've done. Thank you.

Marcos
Daniel Kasak

Trying to make a Delphi database application run correctly

Post by Daniel Kasak »

On Mon, 2009-04-20 at 08:13 -0500, marcos_antonio_ps wrote:
If you read my question in the forum listed above you know that I'm trying to run
a Delphi database application developed in Windows using Wine.
Database apps on Linux. My favourite topic :)

2 points.

Firstly, Borland have a Linux version of Delphi, called Kylix. I bought
Kylix version 1 ( and was pretty disappointed with it to be honest ).
But later versions may have improved. Interestingly, Kylix was mostly
Delphi on wine anyway. I think they've ported more of it to run native
now. If you want to try running under Kylix, email me.


Dan
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Trying to make a Delphi database application run correct

Post by vitamin »

Daniel Kasak wrote:But later versions may have improved.
What later versions? There wasn't any. Kylix died before learning to crawl.
Daniel Kasak

Trying to make a Delphi database application run correctly

Post by Daniel Kasak »

On Mon, 2009-04-20 at 22:29 -0500, vitamin wrote:
Daniel Kasak wrote:
But later versions may have improved.
What later versions? There wasn't any. Kylix died before learning to crawl.
Oh well that sounds final then. There were at least versions 2 and 3, so
it's not exactly correct to say that there "wasn't any".

I remember considering upgrading, but deciding that I'd probably regret
it almost as much as the 1st purchase. Didn't know the thing had died
completely though. Whatever. Still might be an easy way to make a Delphi
app run if it won't work under wine.

Or alternatively the original poster can ...

Vitamin wrote:
Upgrade then we'll talk.
Either way, we're both giving help to the best of our abilities, right?

Dan
Daniel Kasak

Trying to make a Delphi database application run correctly

Post by Daniel Kasak »

On Mon, 2009-04-20 at 08:13 -0500, marcos_antonio_ps wrote:
If you read my question in the forum listed above you know that I'm trying to run
a Delphi database application developed in Windows using Wine.
Further to my suggestion on Kylix, I've just come across this:
http://en.wikipedia.org/wiki/Lazarus_(software)

It's a linux clone of Delphi. Can't comment on it's quality /
usability / compatibility ( obviously, as I haven't used it ), except to
quote:

"Under Linux, Delphi source code can be compiled with Lazarus with a
little adaptation."

Dan
marcos_antonio_ps
Level 2
Level 2
Posts: 17
Joined: Mon Apr 20, 2009 8:05 am

Re: Trying to make a Delphi database application run correct

Post by marcos_antonio_ps »

Hello, Daniel. Thanks for you reply. I'm sorry for the delay. Just now I had a look at the forum because I'm not working today.
Well, I have already heard of Kylix since the early beginning, but I'm not considering giving it a try now because I don't have the time to make any changes to my application right now (and I know I would need to do some). I just need to make it run on Linux and Wine seems a good choice. Besides the error when I try to post something to the database, everything else is working ok. Tomorrow I will start looking at upgrading to a new version of Wine as suggested by vitamin. Thank you once again.

Marcos
Gert van den Berg

Trying to make a Delphi database application run correctly

Post by Gert van den Berg »

On Tue, Apr 21, 2009 at 07:41, Daniel Kasak
<[email protected]> wrote:
Further to my suggestion on Kylix, I've just come across this:
http://en.wikipedia.org/wiki/Lazarus_(software)

It's a linux clone of Delphi. Can't comment on it's quality /
usability / compatibility ( obviously, as I haven't used it ), except to
quote:
Haven't used it recently, but found it usable for simple apps.... (I
used it under Windwos a few years back)

Free Pascal's compiler is quite good.

Quite a bit of adaptation used to be needed to get Delphi apps to
compile, especially if some external dependencies are used..

Posting to Lazarus is easier than porting to Kylix though...

Gert
marcos_antonio_ps
Level 2
Level 2
Posts: 17
Joined: Mon Apr 20, 2009 8:05 am

Re: Trying to make a Delphi database application run correct

Post by marcos_antonio_ps »

One last question before upgrading Wine: I installed ODBC (mdac28) and a fake IE6 using winetricks . Do I have to uninstall them before upgrading or they will be remove automatically when I uninstall my current Wine version?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Trying to make a Delphi database application run correct

Post by vitamin »

marcos_antonio_ps wrote:One last question before upgrading Wine: I installed ODBC (mdac28) and a fake IE6 using winetricks . Do I have to uninstall them before upgrading or they will be remove automatically when I uninstall my current Wine version?
There is no way to uninstall them.

It is recommended to remove ~/.wine whenever you do a big version change. Or when doing any sort of troubleshooting to "start clean".
marcos_antonio_ps
Level 2
Level 2
Posts: 17
Joined: Mon Apr 20, 2009 8:05 am

Re: Trying to make a Delphi database application run correct

Post by marcos_antonio_ps »

Ok, now I have already done the following things:

1. Uninstalled Wine 1.0.1 completely from the system. I even deleted
the directory .wine to start clean.
2. Installed Wine 1.1.19 following the instructions found here:
http://www.winehq.org/download/deb
3. Installed ODBC (mdac28) using the winetricks script. I have already checked if it
installed ok using the command wine odbcad32.exe .

But I haven't installed my application on Wine yet because I want ask you the right way
to do that. My application only consists of five files: the executable, two libraries (.dll),
and two configuration files (.ini). They can reside in the same directory. So I'm
thinking of just creating a new directory under /home/marcos/.wine/drive_c/Program Files and place the files there. Is this the right way? I also would like the program to appear in the Wine menu to easy access. In Windows I have an installer for this application, but I don't think that I need an installer to install this application on Wine as I could have problems trying to run the installer on Wine.

Marcos
marcos_antonio_ps
Level 2
Level 2
Posts: 17
Joined: Mon Apr 20, 2009 8:05 am

Re: Trying to make a Delphi database application run correct

Post by marcos_antonio_ps »

I've just installed my application using an installer on Wine 1.1.19 and the error went away. I want to thanks a lot vitamin, dimesio and all other users that participated in this discussion.
That was a big problem to me and that had to be fixed. Once again, thank you very much for your support.

Marcos
Locked