Application shutdown with a specific query

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for MySQL in Delphi and C++Builder
Post Reply
webpac
Posts: 32
Joined: Wed 04 Apr 2007 16:13

Application shutdown with a specific query

Post by webpac » Tue 21 Apr 2009 08:23

Hi everyone,

I'm a developper with Delphi 7 and I'm using dbexpmda.dll to connect to MySQL databases.

This query shutdown my application when I try to make an open :

Code: Select all

SELECT 
	SUM(LIGNES.QCOM*(LIGNES.TYPCOM="C"))-SUM(LIGNES.QCOM*(LIGNES.TYPCOM="A"))

FROM 
	lignes LIGNES LEFT OUTER JOIN nature NATURE ON ( LIGNES.NUMPRO = NATURE.CODE_NATURE ) , 
	eleveurs	ELEVEURS, 
	bandes	BANDES, 
	familles	FAMILLES

WHERE 
		BANDES.eleveur = ELEVEURS.CLE
	AND
		LIGNES.CUIR = BANDES.lot
	AND
		FAMILLES.FAMILLE = NATURE.FAMILLE
	AND
	(
		BANDES.lot = 4
	AND
		BANDES.batiment = "1"
	AND
		FAMILLES.FAMILLE = "POULET"
	)
But the same with intermediate fields works :

Code: Select all

SELECT 
	SUM(LIGNES.QCOM*(LIGNES.TYPCOM="C"))-SUM(LIGNES.QCOM*(LIGNES.TYPCOM="A")), 
	SUM(LIGNES.QCOM*(LIGNES.TYPCOM="C")), 
	SUM(LIGNES.QCOM*(LIGNES.TYPCOM="A"))

FROM 
	lignes LIGNES LEFT OUTER JOIN nature NATURE ON ( LIGNES.NUMPRO = NATURE.CODE_NATURE ) , 
	eleveurs	ELEVEURS, 
	bandes	BANDES, 
	familles	FAMILLES

WHERE 
		BANDES.eleveur = ELEVEURS.CLE
	AND
		LIGNES.CUIR = BANDES.lot
	AND
		FAMILLES.FAMILLE = NATURE.FAMILLE
	AND
	(
		BANDES.lot = 4
	AND
		BANDES.batiment = "1"
	AND
		FAMILLES.FAMILLE = "POULET"
	)
I tried with the last version of dbexpmda.dll 4.40.0.15 and the big isn't fixed.

Is this issue known or not ?

Thanks,
Last edited by webpac on Wed 22 Apr 2009 10:28, edited 1 time in total.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 21 Apr 2009 09:12

I could not reproduce the problem. Please send me a complete small sample to dmitryg*devart*com to demonstrate it, including a script to create and fill tables.

webpac
Posts: 32
Joined: Wed 04 Apr 2007 16:13

Post by webpac » Wed 29 Apr 2009 07:42

Hi,

I sent you an email on 22 april, did you recieve it ?
Can you reproduce the problem with the export ?
Do you need some others informations ?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 30 Apr 2009 10:26

Unfortunally I didn't receive your e-mail. Please send it to me anew.

webpac
Posts: 32
Joined: Wed 04 Apr 2007 16:13

Post by webpac » Thu 30 Apr 2009 12:13

New one sent.

webpac
Posts: 32
Joined: Wed 04 Apr 2007 16:13

Post by webpac » Mon 04 May 2009 09:01

Did you recieve the new one ?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 05 May 2009 12:01

I still didn't receive your e-mail. Try to send your e-mail to the following address: feedback at devart dot com

webpac
Posts: 32
Joined: Wed 04 Apr 2007 16:13

Post by webpac » Wed 06 May 2009 07:35

I sent a new one to the new email.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 06 May 2009 13:07

I still didn't receive your e-mail.
Please check your IP address in black lists, ask your administrator or send the e-mail from other e-mail service.
It's strange we can not receive your e-mail. We receive lots of letters every day and have not encountered such problems earlier.

webpac
Posts: 32
Joined: Wed 04 Apr 2007 16:13

Post by webpac » Thu 14 May 2009 09:00

You can directly download the file to this url :
http://pascal.libaud.free.fr/Export.rar

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 20 May 2009 08:43

Thank you for information. We have reproduced the problem.
The problem is that dbExpress has limitation for field name length in 32 symbols. To solve the problem you should use the following SQL:

Code: Select all

SELECT 
  SUM(LIGNES.QCOM*(LIGNES.TYPCOM="C"))-SUM(LIGNES.QCOM*(LIGNES.TYPCOM="A")) as sum1
  ...

webpac
Posts: 32
Joined: Wed 04 Apr 2007 16:13

Post by webpac » Fri 19 Jun 2009 10:22

Thank you, I notice the solution.

Post Reply