Solved

cant enter data in DBGrid with Clientdataset

Posted on 2013-06-09
10
965 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

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