Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

cant enter data in DBGrid with Clientdataset

Posted on 2013-06-09
10
Medium Priority
?
1,111 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 101

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 101

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

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

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 101

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

916 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