Subject Re: [firebird-support] Re: * - ?
Author Robert martin
Adam wrote:

>--- In firebird-support@yahoogroups.com, Robert martin <rob@c...> wrote:
>
>
>>Hi
>>
>>Excuse my confusion (I haven't been following this thread) but what
>>exactly causes your app to die if you are using a ' Select * ' type
>>query? I can understand a ' select a,b,c ' type would have problems
>>
>>
>if
>
>
>>b was removed from the base table. Am I just confused?
>>
>>
>>
>
>Either trying to assign a field value to a field that does not exist or
>trying to assign a non existing value to a field (I forget which gives
>the AV).
>
>
>

Agreed but how does specifying the fields in the source select protect
you from code errors like this?

>Even if your component set protects you (ie wraps a try except end
>around it), it is still bad practice. I believe it could be used as a
>litmus test to how careful you are about your query design. If you
>haven't even been bothered to cull the non-essential fields from the
>result set, then what is the chance the plan was analysed to make sure
>it will perform well?
>
>
>
True, I agree with you. However in some cases (like a dumb grid
display), having a Select * means no change may be required in to see
extra data (dumb example).

>I agree with the original poster that it is a PITA to do it, but there
>are so many ways of not having to type it in. It is an additional 30
>seconds work to fire up one of the tools that gets the field names for
>you.
>
>Adam
>
>
>
>