Page 1 of 1

ODAC 6.0.0.4/5: Wrong behavior when supporting IProvider interface

Posted: Thu 12 Apr 2007 10:53
by Vigi
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.

Posted: Thu 12 Apr 2007 13:23
by Plash
We have fixed this problem. The fix will be included in the next build of ODAC.