Format Question

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tandrecht
Posts: 4
Joined: Wed 14 May 2008 23:52

Format Question

Post by tandrecht » Wed 09 Jul 2008 22:37

How can I keep a TMSQuery from saving a display format and using it to override a format set on a client side control?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 11 Jul 2008 07:10

Try using the DisplayFormat property. You can read more about it in the Delphi help.

tandrecht
Posts: 4
Joined: Wed 14 May 2008 23:52

Post by tandrecht » Fri 11 Jul 2008 19:40

Ok, I should have clarified a bit more. The query in question returns a different set of data depending on the database, and setting a display format on the client control (it's dynamically created depending on available data) hasn't worked so far to allow me to display the information as I need it. What I want to do is to retrieve the dataset, create my dynamic link, and then be able to format the display as I want it (phone number vs zip code vs order number, etc.).

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 14 Jul 2008 06:17

Probably the OnGetText event will help you. You can write several handlers and assign them to the event depending on data.

Post Reply