Subject Re: [firebird-support] Embedded SQL and NULLs
Author Ann W. Harrison
sboydlns wrote:
> I was wondering if there was some way to handle columns
> with NULL values without using indicator variables. If I
> were to initialize all host variables to some sensible
> value, like zero for numeric fields and an empty string
> for character fields, would those values be preserved by
> the FETCH. That is, would NULL columns returned by the
> FETCH leave the affected host variables unchanged?

Probably, but that's an artifact of implementation that
may change arbitrarily in the future. Or, horrors, you
may find that you've got data where zero or an empty
string is a legitimate value.

Indicator variables exist for a purpose. Use them.

Good luck,

Ann