How can I add fields to a clientdataset at runtime?

前端 未结 5 2009
盖世英雄少女心
盖世英雄少女心 2021-01-04 18:05

I have a TClientDataSet, which is provided by a TTable’s dataset. The dataset has two fields: postalcode (string, 5) and street (string, 20)

<
5条回答
  •  孤街浪徒
    2021-01-04 18:51

    Would like to share more accurate Query for unexisting fields. I bet it's better to use cast, neither spaces!

    select E.NAME, E.SURNAME, cast(null as varchar(20)) as CITY
    from EMPLOYEE E
    

    e.g. | Marc'O | Polo | |

    It's more accurate, can definetly see field size, understandable, easy, safe!

提交回复
热议问题