Problems with param DataType/ParamType.
Posted: 10.01.2012, 19:35
[align=justify][font=Tahoma]Hi there,
My company uses firebird 2.5 and Delphi 7, and until some weeks ago Zeos 6.6.3. Then our dev team decide it's time to update it due the problems we saw solved in the changelog.
We tryed version 6.6.6 and it was very buggy, so we tryed the trunk and it's unbelivable shows itself more stable than 6.6.6 on our basecode, so we decide to use it, also due to the compatiblity with newer versions of delphi.
The version of our software that have a updated Zeos (Trunk rev. 966) is in beta and so far we notice a great improve on memory management and speed, but also a lot of little "bugs", most of them caused for our's legacy bad coding and we deal with almost every problem that've shows up so far, but some of them are causing more headaches than others.
One of them is that on a TZQuery we're used to simply put the SQL code with the params on it like this:
And to make the coder easier, sometimes we have a global var in some format, let's say string, and the field on the database is something else, like integer in this case, so we popule it somehow like this:
It was working on version 6.6.3 we've have, but stop working in the actual version. That's a very bad pratice i know, but the project is full of legacy code and we are working to rewrite it, but it's not even our hardest issue.
In some cases we try to populate the param with the right value type and if in the TZQuery/TZReadOnlyQuery those param's DataTypes are set to ftUnknown and/or the ParamType is ptUnknown (with is the very wide cases on our's forms) then after we open it (in some cases that we could't identify why so far) it's empty. But it was supose to return something.
We have many many forms on our project and in addition to our common goals it would take months to correct every param's properties and re-test all our sotware features. Again, there's so much legacy bad code that we will be forced to rewrite sooner than we schedule.
Anyone have a idea of what is happening here or mean how to solve it, please help us. Or better, if anyone here has gone through a problem like this before, please could you share with me the cause and/or the solution to this.
Thank you very much since now and sorry for the bad english.
EmÃlio B. Pedrollo.[/font][/align]
My company uses firebird 2.5 and Delphi 7, and until some weeks ago Zeos 6.6.3. Then our dev team decide it's time to update it due the problems we saw solved in the changelog.
We tryed version 6.6.6 and it was very buggy, so we tryed the trunk and it's unbelivable shows itself more stable than 6.6.6 on our basecode, so we decide to use it, also due to the compatiblity with newer versions of delphi.
The version of our software that have a updated Zeos (Trunk rev. 966) is in beta and so far we notice a great improve on memory management and speed, but also a lot of little "bugs", most of them caused for our's legacy bad coding and we deal with almost every problem that've shows up so far, but some of them are causing more headaches than others.
One of them is that on a TZQuery we're used to simply put the SQL code with the params on it like this:
Code: Select all
qQuery.SQL.Text := 'select * from table_name where id = :id';
qQuery.ParamByName('id').AsInteger := 1;
qQuery.Open;
Code: Select all
stringVar := '1';
(...)
qQuery.ParamByName('integerParamName').AsString := stringVar;
In some cases we try to populate the param with the right value type and if in the TZQuery/TZReadOnlyQuery those param's DataTypes are set to ftUnknown and/or the ParamType is ptUnknown (with is the very wide cases on our's forms) then after we open it (in some cases that we could't identify why so far) it's empty. But it was supose to return something.
We have many many forms on our project and in addition to our common goals it would take months to correct every param's properties and re-test all our sotware features. Again, there's so much legacy bad code that we will be forced to rewrite sooner than we schedule.
Anyone have a idea of what is happening here or mean how to solve it, please help us. Or better, if anyone here has gone through a problem like this before, please could you share with me the cause and/or the solution to this.
Thank you very much since now and sorry for the bad english.
EmÃlio B. Pedrollo.[/font][/align]