Link to home
Start Free TrialLog in
Avatar of davinci1942
davinci1942

asked on

cant enter data in DBGrid with Clientdataset

I have an application written in Delphi7 that uses many clientdatasets that all allow me to edit fields in place in the grid when attached to a DBGrid.  I am finding out that this is not the case for Delphi 2010, XE2 or XE3. I am also in Delphi 7 editting SQL result sets attached to a DBGrid with absolutely no problems. I can not do this in 2010, XE2, XE3.  I have checked all Read Only flags in the clientdataset itself and for all the individual fielddefs and they are all false. Is there something that I am missing?

BTW: I am not using providers with my TClientdatasets .. they are all local.
Avatar of Mike McCracken
Mike McCracken

Are you updating the same tables/databases?

Is each dataset a single table?

mlmcc
Avatar of davinci1942

ASKER

each grid is a single table. Essentially each DBGrid is hooked to a Datasource pointing to a single clientdataset or a sing query.
You say single dataset or query.  Not necessarily the same as a single table.

Are the datasets made from more than 1 table or does the query use more than 1 table?

mlmcc
It only uses one clientdataset.  In the query version it only uses one query.
That is not what I am asking.

What is the query?
What are the tables behind the dataset.

mlmcc
The table behind the query is a dbisam table, ie Tdbisamtable The query that i am using is a Tdbisamquery. When i use a client daraset, ithe table is a Tclientdataset.
I asked because if you have more than 1 table in the dataset or the query, the recordset it produces might not be updateable since there potntailly are more than 1 record.

Do you include the primary key in the recordset?
If not, you need to that way there is only 1 record for that line in the grid.

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of davinci1942
davinci1942

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial