Subject TIBOQuery + TClientDataSet = EDatabaseError
Author kokok_kokok
I need to use a TClientDataSet + TDataSetProvider. I tie the TDataSetProvider with a TIBOQuery.

It works fine, but when I do not use the primary key in the SELECT clause, a EDatabaseError is raised by TIBOQuery.

This problem is widely managed in
http://tech.groups.yahoo.com/group/IBObjects/message/44737
and other posts, but until know, I have not found the solution.

In some case, I do not need/want to add the primary key value in the SQL. For example:

SELECT SUM(Amount) AS Total FROM Orders

other case that fails:

SELECT ID AS OrderID, Name FROM Orders

I have tried to use KeyLinks but it continues failing. It seems that IBO calculates the primary key and then it tries to use it, but since it is not in the SELECT clause, a Field Not Found error is raised.

Any help will be welcome. Thank you