• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1233
  • Last Modified:

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.
0
davinci1942
Asked:
davinci1942
  • 4
  • 4
1 Solution
 
mlmccCommented:
Are you updating the same tables/databases?

Is each dataset a single table?

mlmcc
0
 
davinci1942Author Commented:
each grid is a single table. Essentially each DBGrid is hooked to a Datasource pointing to a single clientdataset or a sing query.
0
 
mlmccCommented:
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
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
davinci1942Author Commented:
It only uses one clientdataset.  In the query version it only uses one query.
0
 
mlmccCommented:
That is not what I am asking.

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

mlmcc
0
 
davinci1942Author Commented:
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.
0
 
mlmccCommented:
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
0
 
davinci1942Author Commented:
I answered this question myself. The problem was not with the grid, tables, clientdatasets, etc., it was with the datasource. The autoedit property was set to false.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now