Page 1 of 1

Delphi 2009 - Unidac 2.0(Mysql) + ClientDataSet Problem

Posted: Fri 09 Jan 2009 13:08
by Pir
Hi.

I'm testing Unidac trial, and i'm having some problems.

My setup is: Uniquery (SELECT Query Only)+ DataSetProvider + ClientDataset + DataSource

DBMonitor reports error after ClientDataSet.ApplyUpdates (Error #42000 near "IDCLIENTE" from "clientes".......

Heres my mysql server log:
3 Query SET TRANSACTION ISOLATION LEVEL READ COMMITTED; BEGIN
3 Query update "clientes" set "NOME" = 'TEST' where "IDCLIENTE" = 1
3 Query select "IDCLIENTE" from "clientes" where "IDCLIENTE" = 1
3 Query COMMIT

The error seems to be with the select query after update (double quotes).

This wrong select query is generated by Delphi or by UniDAC?

My workarounds so far:
-Set ResolveToDataSet on all DataSetProvider components or
-Set poUseQuoteChar on all DataSetProvider components or
-Use SQL Generator on all TUniQuery components.

Thanks and sorry for my bad english.

Posted: Tue 13 Jan 2009 09:57
by Dimon
This problem appears because the query is generated by DataSetProvider and this query can't be executed by MySQL server. If you need to use ClientDataset, the optimal solution is to set ResolveToDataSet of DataSetProviders to True that the query will be generated by UniDAC.
To increase performance you can connect DataSource directly to UniQuery.