Page 1 of 1

Assertion failure

Posted: Tue 27 Mar 2007 19:42
by Wilton
After install new version 5.0 of MyDAC, i'm receive this error when execute one Script:

"Assertion failure (D:\Projects\Delphi\MyDac\Source\MyAccess.pas,line 4008"

What's happen?

MySQL server version: 4.1.14-standard-log
MySQL client version: Direct
Delphi 5.0
MyDAC 5.00.04

Posted: Wed 28 Mar 2007 07:23
by Antaeus
I could not reproduce the problem. Please try to reduce size of the script you are trying to execute as much as possible and send it to me at evgeniyd*crlab*com.

Posted: Wed 28 Mar 2007 09:26
by Thomas J.
Sorry I want to create a new topic :oops:

Assertion failure

Posted: Wed 28 Mar 2007 12:07
by Wilton
Script calling:

ScriptVariacaoCambial.MacroByName('pasta').Value := QfilesNpasta.AsString; // value ='223610'
ScriptVariacaoCambial.MacroByName('valor').Value := FloatToStr(variacao); // value ='-56.30'
ScriptVariacaoCambial.MacroByName('dia').Value := QuotedStr(formatdatetime('yyyy-mm-dd',DBDateEdit1.Date)); // value = '2007-03-28'
ScriptVariacaoCambial.Execute;

Script statements:

SELECT @VAR:=MAX(ITESTE)+1 FROM ninvoic WHERE ninvoic.NPASTA=&pasta GROUP BY NPASTA;
INSERT INTO ninvoic
(NPASTA,ITESTE,CODFOR,BKN,PNR,Codcid,Codhot,DIN,HIN,DOUT,HOUT,QTD,TIPO,VBUS,CTUS,ROUS,CODSERV,HS,
HOTSERV,CTML,DESCROOM,NP,PARID,MOEDA,VLUS,COMCLI,STT,Vouch,Vbcalc,Nps,Bilhete,Cia,Info,npinvoic)
SELECT &pasta,@VAR,NULL,NULL,NULL,'SAO5',NULL,&dia,NULL,NULL,NULL,NULL,NULL,0,&valor,-(&valor),NULL,'V',
'Variação Cambial',NULL,NULL,NULL,1,'USD',0,0,'KK',NULL,NULL,NULL,NULL,NULL,NULL,NULL;

Using the MyScript Editor with debugger, apparentily the first statement is not runs.

Tks,

Posted: Thu 29 Mar 2007 10:37
by Jackson
Thank you for information.
We have reproduced the problem and fixed it.
This fix will be included in the next build of MYDAC 5.