Problem using MySql
Publicado: Mié Sep 04, 2013 5:10 pm
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.
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.