Solved

cant enter data in DBGrid with Clientdataset

Posted on 2013-06-09
10
927 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
 

Author Comment

by:davinci1942
ID: 39249120
It only uses one clientdataset.  In the query version it only uses one query.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now