Subject | Re: [IBO] Renaming Firebird fields programmatically |
---|---|
Author | Terry Black |
Post date | 2011-05-05T05:47:38Z |
Hi, yes it's for display purposes. I can use FieldsDisplaylabel or FieldsGridLabel properties but this only gives me a temporary solution. Each time I open the application there will be an increasing overhead of remembering what field has been renamed. There are about 150 fields. So far I have used FieldsDisplaylabels.
Changing the field names may also cause me problems as I may have to have some way of knowing what they are called e.g qrGolf.FieldByName('xyz').value
Terry
What is your exact purpose for changing field name in the database??
It seems that you do this for displaying purposes...
You can always use field aliases in your sql statements
or FieldsDisplaylabel and FieldsGridLabel properties.
Marcin
W dniu 05.05.2011 03:50, Terry Black pisze:
Changing the field names may also cause me problems as I may have to have some way of knowing what they are called e.g qrGolf.FieldByName('xyz').value
Terry
>>> Marcin Bury <mbury@...> 5/05/2011 3:31 pm >>>Terry
What is your exact purpose for changing field name in the database??
It seems that you do this for displaying purposes...
You can always use field aliases in your sql statements
or FieldsDisplaylabel and FieldsGridLabel properties.
Marcin
W dniu 05.05.2011 03:50, Terry Black pisze:
> Thanks, that seems to work just fine. I am not sure what you mean when you say "Perhaps you could set an event alerter to accompanyDisclaimer: Unless explicitly attributed, the opinions expressed in this email are those of the author only and do not represent the official view of Northern Sydney Central Coast Health nor the New South Wales Government.
>> your metadata change."
>
> I am using this in a particular situation where I would like the fields renamed by the date they are used as selected by the user. I have been looking at FieldsDislayLabel but renaming the actual fields may be a better solution.
>
> Terry
>
>
> --- In IBObjects@yahoogroups.com, "Support List"<supportlist@...> wrote:
>>
>> Terry,
>>
>>> I am running a Delphi7 application which is live.
>>> If I rename a field in Firebird using Flamerobbin how do I refresh the
>>> IB_Grid so that the renamed field changes in the Delphi application.
>>>
>>> Assuming I can do this I would assume that I run a Script with something
>>> like ALTER TABLE TITLE ALTER AGE7 TO AGE8;
>>
>> The dataset would need to be unprepared and prepared again to pick up on the
>> change to the underlying table. You would need to somehow notify your
>> application to do that. Perhaps you could set an event alerter to accompany
>> your metadata change.
>>
>> Jason LeRoy Wharton
>> www.ibobjects.com
>>
>
>
>
>
> ------------------------------------
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more ! Yahoo! Groups Links
>
>
>