TClientDataSet editing with TMSQuery on server

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 9
Joined: Wed 19 Jan 2005 22:58

TClientDataSet editing with TMSQuery on server

Post by Dmitri » Tue 25 Jan 2005 18:50


We are using TClientDataSet in our MIDAS application and sometimes,
for display purposes, must modify some of the field values on client site
without changing them in database. In this case TQuery does not use any UpdateSQLs and it was working fine.

When I switch to TMSQuery instead of TQuery on server site, I recieve an error messages like "Field "FieldName" cannot be modified".
I cannot get rid this behavior by changing settings for TMSQuery as CachedUpdates = true.
I believe TMSQuery set all the fileds which do not belong to the first table in FROM clause to ReadOnly.
Setting Option->SetFieldsReadOnly = false does not make any difference...

How can I make all the fileds in dataset editable without automatic generation any SQLUpdate and using UpdatingTable?
May be there is another reason for this behavior?

Any help would be appreciated.

Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Re: TClientDataSet editing with TMSQuery on server

Post by Ikar » Wed 26 Jan 2005 14:20

We couldn't reproduce the problem.
Please send us (sdac*crlab*com) complete small sample to demonstrate it and include script to create server objects.

Posts: 1
Joined: Wed 19 Apr 2006 02:41

Post by PascalD » Wed 19 Apr 2006 02:45

I have the exact same problem

I'm converting an application from ADO to SDAC and it was working in ADO.

SDAC Delphi 5

Is there any fix or do I need to send my own piece of code?



Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Wed 19 Apr 2006 12:46

We couldn't reproduce the problem.
Please send us a complete small test project to reproduce the problem; it is desirable to use Northwind or Master schema objects, otherwise include definition of your own database objects; don't use third party components

Also supply us following information
- Exact version of Microsoft SQL Server and OLE DB provider that you use. You can see it in Info sheet of TMSConnection Editor

Posts: 24
Joined: Tue 06 Dec 2005 21:17

Post by jfpicard » Wed 19 Apr 2006 13:04

I saw the problem too. When we create a Query and we add the fields in the field editor, all the fields that are not coming from a table are added read only. (like that SQL clause : SELECT Convert(Varchar(30), '') as TEST)

The trick is to review all the added fields and put the property ReadOnly to false. It's a time cosuming operation, but it always works.


Post Reply