Delphi 2009 - Unidac 2.0(Mysql) + ClientDataSet Problem

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Pir
Posts: 2
Joined: Fri 09 Jan 2009 12:53

Delphi 2009 - Unidac 2.0(Mysql) + ClientDataSet Problem

Post by Pir » Fri 09 Jan 2009 13:08

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.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 13 Jan 2009 09:57

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.

Post Reply