AndreyZ wrote:Hello,
To remove curly brackets from the uniqueidentifier column, you can use persistent fields and the OnGetText event handler in the following way:
- Code: Select all
procedure TMainForm.ClientDataSetuidGetText(Sender: TField; var Text: String;
DisplayText: Boolean);
begin
Text := Copy(Sender.AsString, 2, Length(Sender.AsString) - 2);
end;
This is of course possible, but I can't use such approach(persistent fields) in my case. The application would have to handle every uniqueidentifier field this way explicitly, but it simply doesn't know them:-(( Moreover, the described solution might work with dbGrid, but not when applying filters on the dataset - I guess.
I'd rather have dbExpress driver (or the underlaying sql server client library) configured to behave the required way for every uniqueidentifier field in the database implicitly - if possible.