ODAC 6.0.0.4/5: Wrong behavior when supporting IProvider interface

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Vigi
Posts: 10
Joined: Thu 12 Apr 2007 10:02

ODAC 6.0.0.4/5: Wrong behavior when supporting IProvider interface

Post by Vigi » Thu 12 Apr 2007 10:53

I try to use ODAC 6.x to create an application that uses DataSnap.

TOraSession TOraQuery TDataSetProvider ClientDataSet1 / ClientDataSet 2

The ClientDataSets have different CommandText properies. Say CDS1 has "select * from a" and CDS2 has "select * from b".

Now I do the following:

CDS1.active:=true;
CDS2.active:=true;

// After that the TOraQuery.SQL.Text is "select * from b".

CDS1.Insert;
CDS1.Fields ... := 1; // edit the desired fields
CDS1.Post;

OraQuery.sql.text := cds1.CommandText; // This is because the provider gets the table name from the DataSet.

CDS1.ApplyUpdates(0);

Now the Provider gets table b for update instead of table a which I have set in the sql.text.

I have investigated your source and the problem seems to be in DBAccess.pas there you should change PSGetTableName to first serve the TableNameFromSQL instead of the saved FOldTableName.

Hope this helps.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 12 Apr 2007 13:23

We have fixed this problem. The fix will be included in the next build of ODAC.

Post Reply