How to replace the field type and value in dbgrid?

C++, C#, Visual Basic, Delphi, Perl a ostatní

Moderátor: Moderátoři Živě.cz

Odeslat příspěvekod adamlevine 31. 3. 2018 05:16

How to replace the field type and value in dbgrid?

My SQL query:

Code: XML [Select] DBForm.DBquery.SQL.text:='select callstart, callend, origin, destination, direction from callrecord;

termtype are integer values 0...3, instead I would like to show in dbgrid column fields: None, Incoming, Outgoing or Internal, accordingly. These text values are not stored in any DB table to be joined with; it is also not allowed to add smth to this DB (in my case). Is there a way how to do this "on fly", when the dbgrid obtains the values from the DB?
adamlevine
Kolemjdoucí

Odeslat příspěvekod Geniál 31. 3. 2018 14:57

Try a lot of vodka.
Geniál
Junior

Odeslat příspěvekod JanFiala 3. 4. 2018 07:06

Use SQL query to transform field on the fly as your dbGrid source
Co můžeš udělat dnes, odlož na včerejšek
JanFiala
Expert
Uživatelský avatar

Odeslat příspěvekod adamlevine 8. 6. 2018 06:57

Thanks
adamlevine
Kolemjdoucí


Kdo je online

Uživatelé procházející toto fórum: Žádní registrovaní uživatelé a 0 návštevníků