For Programmers: Free Programming Magazines  


Home > Archive > Delphi > August 2005 > Process is not terminated









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Process is not terminated
Jens Hartmann

2005-08-25, 6:59 pm

Hi,

I have the following problem:

I wrote a programm which connects to a MySQL-Database. I use "libmySQL.dll"
and "mysql.pas" which are recommended on mysql.com.
To connect to the Database I use mysql_real_connect(). To terminate the
connection I use mysql_close().
Everytime I close the program after I have connected to the database, the
programm-prozess is not terminated. If I close the program without having
connected to the database there is no problem.

How can I terminate the process or what have I to do in order the let the
prozess terminate by itself?

I use Delphi 5, MySQL 4.0.13., the unit "mysql.pas" and the required
"libmySQL.dll". My OS is WinXP SP2.

Thanks in advance!

Greets Jens


Łabster

2005-08-29, 3:57 am

I use HALT(1)

or
asm
push 0
call ExitProcess
end;
Użytkownik "Jens Hartmann" <jens_hartmann@yahoo.de> napisał w wiadomości
news:del7gq$59f$1@online.de...
> Hi,
>
> I have the following problem:
>
> I wrote a programm which connects to a MySQL-Database. I use

"libmySQL.dll"
> and "mysql.pas" which are recommended on mysql.com.
> To connect to the Database I use mysql_real_connect(). To terminate the
> connection I use mysql_close().
> Everytime I close the program after I have connected to the database, the
> programm-prozess is not terminated. If I close the program without having
> connected to the database there is no problem.
>
> How can I terminate the process or what have I to do in order the let the
> prozess terminate by itself?
>
> I use Delphi 5, MySQL 4.0.13., the unit "mysql.pas" and the required
> "libmySQL.dll". My OS is WinXP SP2.
>
> Thanks in advance!
>
> Greets Jens
>
>



Erik

2005-08-29, 7:01 pm


The first thing I would do is test to see if the MySQL
server is closing your connection at your mysql_close()
statement.

Put a button on your form, and onclick mysql_close()
watch the server to see that your connection no longer
exists.

It kind of sounds like your app is waiting for the
connection to be closed.

I'm sure somebody smarter than I will say something if
I'm just talking out my butt, here.

GL

Jens Hartmann wrote:
> Hi,
>
> I have the following problem:
>
> I wrote a programm which connects to a MySQL-Database. I use "libmySQL.dll"
> and "mysql.pas" which are recommended on mysql.com.
> To connect to the Database I use mysql_real_connect(). To terminate the
> connection I use mysql_close().
> Everytime I close the program after I have connected to the database, the
> programm-prozess is not terminated. If I close the program without having
> connected to the database there is no problem.
>
> How can I terminate the process or what have I to do in order the let the
> prozess terminate by itself?
>
> I use Delphi 5, MySQL 4.0.13., the unit "mysql.pas" and the required
> "libmySQL.dll". My OS is WinXP SP2.
>
> Thanks in advance!
>
> Greets Jens
>
>


J French

2005-08-30, 3:56 am

On Mon, 29 Aug 2005 10:51:10 +0200, "Łabster" <labsta@poczta.of.pl>
wrote:

>I use HALT(1)
>
>or
>asm
>push 0
>call ExitProcess
>end;


Out of interest, why use ASM
- ExitProcess is just a StdCall API

ExitProcess( 0 );



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com