Re: Parametrized query fails
Posted in 1996
Alexander Ponomarenko <shura@bitcom.msk.ru> wrote: :Now about in-fly query construction. There in Delphi are :*several* problems with dynamic SQL. Firstly, queries in :Delphi are objects with SQL text and parameters defined :as properties. Fields are objects also and contains :extended field attribs such as display order, width, mask, :etc. All these assigned in DESIGN TIME. Of course, you can :dynamically change SQL text but in this case you will lose :all extended field attributes and parameter definition. :That's why we (and other Delphi developers I know) avoid :Dynamic SQL in their programs. I don't know Delphi (yet) and am no expert OO programmer, but this sure doesn't sound right. That is from a design viewpoint, although Delphi may work this way. To me this sounds like Delphi has taken the easy way out to allways bind SQL result sets to display objects. Can this be the right way of doing things? What if you want to select the same set of data, but display them in different ways, or not display them at all, simply use them for further selects or calculations? But that aside, the dynamic part of SQL we where talking about was the where clause, and it shouldn't be that influenced by the extended attributes. Isn't it possible to extend whatever class you are using to gain more controll over the SQL that is generated, and use the "is null" syntax. If it isn't Delphi (and you) seems to have a fairly significant problem. May be you have to define your own classes for the purpose? Nils.Myklebust@ccmail.telemax.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company