Solved

cant enter data in DBGrid with Clientdataset

Posted on 2013-06-09
10
972 Views
Last Modified: 2013-09-12
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
Comment
Question by:davinci1942
  • 4
  • 4
10 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 39233680
Are you updating the same tables/databases?

Is each dataset a single table?

mlmcc
0
 

Author Comment

by:davinci1942
ID: 39249074
each grid is a single table. Essentially each DBGrid is hooked to a Datasource pointing to a single clientdataset or a sing query.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 39249095
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:davinci1942
ID: 39249120
It only uses one clientdataset.  In the query version it only uses one query.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 39249266
That is not what I am asking.

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

mlmcc
0
 

Author Comment

by:davinci1942
ID: 39249391
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
 
LVL 100

Expert Comment

by:mlmcc
ID: 39249414
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
 

Accepted Solution

by:
davinci1942 earned 0 total points
ID: 39260572
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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question