Página 1 de 1

Problem using MySql

Publicado: Mié Sep 04, 2013 5:10 pm
por Milan Mehta
I have just upgraded from Professional to Enterprise Edition.
When I changed my DataSource from Ado to MySql, my working project started
giving me following error :
MYSQL : SHOW INDEX FROM (Select...
The error generated for all the TSqlQuerry:Open syntax.
Typically it goes like this :
cSql := 'SELECT party.partyname, tran.vdate, tran.vno, acmast.acname as
bankname, trim(tran.remarks) as remarks, tran.chequeno, acmast2.acname,
trtrn.amount as headamt, tran.amount, tran.tdsamount, tran.totamt'
cSql += ' from party, tran, acmast, acmast acmast2, trtrn '
cSql += ' where party.partycode = tran.partycode '
cSql += " and tran.compncode = " + LTrim(Str(AppData:XCMPCODE))
cSql += ' and tran.accode = acmast.accode '
cSql += ' and tran.compncode = trtrn.compncode '
cSql += ' and tran.book = trtrn.book '
cSql += ' and tran.vno = trtrn.vno '
cSql += " and tran.book = 'B'"
oSql := TSQLQuery():Create()
WITH OBJECT oSql
:oDataSource := Application:oMainForm:oAdo
IF :lOpen
:Close()
ENDIF
:cSelect := cSql
:Open()
END WITH
What am I doing wrong ?
TIA
Milan.

Problem using MySql

Publicado: Mié Sep 04, 2013 5:18 pm
por ignacio
Hello,
Could you send us the error.log?
Revise the property oMainForm:oAdo
BTW, consider user JOINS instead of:
from party, tran, acmast, acmast acmast2, trtrn '
Regards,

Problem using MySql

Publicado: Jue Sep 05, 2013 7:21 am
por Milan Mehta
The error.log do not generate.
It is Xailer Data Control error as it shows in the attached snapshot.
It being a warning, the program still run on pressing Ok.
Setting the properly lDisplayError := .F. of MySqlDataSource, the warning
too do not display.
TIA
Milan.
"Ignacio Ortiz de Zúñiga" <nonametoavoidspam@xailer.com> wrote in
message news:52274f5a$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Hello,
>
> Could you send us the error.log?
>
> Revise the property oMainForm:oAdo
>
> BTW, consider user JOINS instead of:
>
> from party, tran, acmast, acmast acmast2, trtrn '
>
> Regards,
> --
> Ignacio Ortiz de Zúñiga
> [Equipo de Xailer/Xailer team]
> http://www.xailer.com
> http://www.xailer.info


Attached files

Problem using MySql

Publicado: Jue Sep 05, 2013 9:31 am
por ignacio
Hi,
Please, using the DB information on my previous sample. Try to reproduce your error. TIA.
Regards,