DelphiFAQ Home Search:

Customizing the display of IBObject queries

 

commentsThis article has not been rated yet. After reading, feel free to leave comments and rate it.

If you use IBObjects for your InterBase client application, you can use the powerful TIB_Cursor and TIB_Query to modify how your query results will look for example in a grid. Take a look at the sample source code below.

Note:
All those settings can be made via the object inspector, but when the SQL property is updated at
runtime with a new query, some of these properties seem to get wiped out.
Therefore it's better to set them at run-time in code.

begin
  with TIB_Query1 do
  begin
    FieldsVisible.Add('ID=F');
    FieldsVisible.Add('SLNR=T');  { not really necessary }
    FieldsCharCase.Add('LAND=UPPER');
    FieldsDisplayLabel.Add('COMMENTS=Your Comments');
    FieldsDisplayWidth.Add('COMMENTS=200');
  end;
end;

You don't like the formatting? Check out SourceCoder then!

Comments:

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:
photo Add a picture:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity. The owner of this web site reserves the right to delete such material.