Page 1 of 1

Application shutdown with a specific query

Posted: Tue 21 Apr 2009 08:23
by webpac
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,

Posted: Tue 21 Apr 2009 09:12
by Dimon
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.

Posted: Wed 29 Apr 2009 07:42
by webpac
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 ?

Posted: Thu 30 Apr 2009 10:26
by Dimon
Unfortunally I didn't receive your e-mail. Please send it to me anew.

Posted: Thu 30 Apr 2009 12:13
by webpac
New one sent.

Posted: Mon 04 May 2009 09:01
by webpac
Did you recieve the new one ?

Posted: Tue 05 May 2009 12:01
by Dimon
I still didn't receive your e-mail. Try to send your e-mail to the following address: feedback at devart dot com

Posted: Wed 06 May 2009 07:35
by webpac
I sent a new one to the new email.

Posted: Wed 06 May 2009 13:07
by Dimon
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.

Posted: Thu 14 May 2009 09:00
by webpac
You can directly download the file to this url :
http://pascal.libaud.free.fr/Export.rar

Posted: Wed 20 May 2009 08:43
by Dimon
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
  ...

Posted: Fri 19 Jun 2009 10:22
by webpac
Thank you, I notice the solution.