Filed cannot be modified

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 11
Joined: Tue 27 May 2008 15:03

Filed cannot be modified

Post by ply » Tue 28 Oct 2008 15:43

In MyDAC + mysql calculated fields was editable from the beginning
But in UniDAC + mssql I need to add some code like

Also calculated text fields have length = 1 symbol.
For example if I want to assegn text "hello" to this field, only "h" will be assigned.
My query is: "SELECT *, '' as calcf FROM table1". So the size of "calcf" is 1.

How to make calculated fields in UniDAC + mssql to behave like in mysql?

Now the situation with maximum text length is solved with this sql query:
SELECT *, '__________________________' as calcf FROM table1
but it seems not best way for me to solve the problem=)

Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 30 Oct 2008 12:16

The problem is that MySQL server and MSSQL server process this query in different ways. MSSQL server returns the 'calcf' field length equal 1 and sets readonly flag for it.
If you need to use calculated fields, use local fields, created by Fields Editor.

Post Reply