Subject | Params incorrectly saved in the dfm file |
---|---|
Author | Nando Dessena |
Post date | 2004-01-21T15:32:16Z |
Hello,
here are the steps to reproduce my current problem; they also tell
quite exactly what the problem is:
1) create a new application and put a TIBOQuery on the main form.
2) put a parameterized select statement in its SQL property.
For example:
select *
from RDB$DATABASE
where RDB$DESCRIPTION = :PARAM
3) By means of the Object Inspector, set the param's
DataType property to ftString, and the ParamType property
to ptInput (they are set to ftUnknown and ptUnknown by default).
4) Save the project and unit.
5) Switch to the text dfm view (right click + View as Text) and
notice that the dfm has the new settings:
Params = <
item
DataType = ftString
Name = 'PARAM'
ParamType = ptInput
end>
6) Close the project and reopen it.
7) Check the params settings in the Object Inspector and see that
they have been reset back to their default ftUnknown/ptUnknown.
Delphi 7, IBO 4.3Aa.
To me, it looks like the component is rebuilding the param list on
save, perhaps to overwrite the dataset's param definitions with those
coming from the internal dataset. Unfortunately, since the statement
isn't prepared, the data type and param type of the params are set to
unknown. It should never overwrite anything sensible with Unknown:
string to integer is ok, unknown to anything is ok too, anything to
unknown is not acceptable because the developer that set those
properties obviously knew it well than the component.
This is a rather big problem because the dfms are all messed up and
the source versioning system is not happy.
I tried to find out the proplem cause myself but failed. Any pointers
appreciated. Of course, a fix would be appreciated too. :-)
Ciao
--
Nando mailto:nandod@...
here are the steps to reproduce my current problem; they also tell
quite exactly what the problem is:
1) create a new application and put a TIBOQuery on the main form.
2) put a parameterized select statement in its SQL property.
For example:
select *
from RDB$DATABASE
where RDB$DESCRIPTION = :PARAM
3) By means of the Object Inspector, set the param's
DataType property to ftString, and the ParamType property
to ptInput (they are set to ftUnknown and ptUnknown by default).
4) Save the project and unit.
5) Switch to the text dfm view (right click + View as Text) and
notice that the dfm has the new settings:
Params = <
item
DataType = ftString
Name = 'PARAM'
ParamType = ptInput
end>
6) Close the project and reopen it.
7) Check the params settings in the Object Inspector and see that
they have been reset back to their default ftUnknown/ptUnknown.
Delphi 7, IBO 4.3Aa.
To me, it looks like the component is rebuilding the param list on
save, perhaps to overwrite the dataset's param definitions with those
coming from the internal dataset. Unfortunately, since the statement
isn't prepared, the data type and param type of the params are set to
unknown. It should never overwrite anything sensible with Unknown:
string to integer is ok, unknown to anything is ok too, anything to
unknown is not acceptable because the developer that set those
properties obviously knew it well than the component.
This is a rather big problem because the dfms are all messed up and
the source versioning system is not happy.
I tried to find out the proplem cause myself but failed. Any pointers
appreciated. Of course, a fix would be appreciated too. :-)
Ciao
--
Nando mailto:nandod@...