Re: select error with null string -- error code -209

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: HYip <hualinyip(at)earthlink(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: select error with null string -- error code -209
Date: 2001-05-07 14:23:51
Message-ID: 20856.989245431@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

HYip <hualinyip(at)earthlink(dot)net> writes:
> The code has no problem when both accountname, and account are not
> null. It gives me an errror code of -209 when the account is null.
> Anyone has any idea of fixing it.

(1) Try printing sqlca.sqlerrm.sqlerrmc, not sqlca.sqlcode, if you
don't want to look up error codes.

(2) You need an indicator variable if you want to fetch NULLs.
Else how will you know that the value is NULL?

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tony Grant 2001-05-07 14:33:45 Re: Re: MS-Query
Previous Message Fran Fabrizio 2001-05-07 14:23:05 Re: subtratcing dates