Larry:
I ran the following code on a table that has a VarBit column and it seems to
detect the Null image correctly. I tested with a record that has an image
and one that does not and it seems to work.
CLEAR VAR vLogo, vStat, vInd
-- Select a record with a valid image
SELECT org_logo INTO vLogo INDICATOR vInd FROM orgfile where orgno ='VTG'
-- var vInd shows as 1
IF vLogo IS NULL THEN
SET VAR vStat = 'vLogo is NULL'
ELSE
SET VAR vStat = 'vLogo is not NULL' --goes here
ENDIF
CLEAR VAR vLogo
-- Select a record with a invalid/NULL image
SELECT org_logo INTO vLogo INDICATOR vInd FROM orgfile where orgno ='TST'
-- var vInd shows as -1
IF vLogo IS NULL THEN
SET VAR vStat = 'vLogo is NULL' -- goes here
ELSE
SET VAR vStat = 'vLogo is not NULL'
ENDIF
RETURN
I am not sure what you application is but it might give you some ideas...
Javier,
Javier Valencia
913-915-3137
________________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of Lawrence
Lustig
Sent: Thursday, February 12, 2009 9:23 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - How to tell if VARBIT column IS NULL
I have a VARBIT column containing images. In my form, I want to determine
whether the column is NULL or contains an image and adjust my user interface
accordingly. However, any attempt to learn whether the VARBIT column is
NULL (for instance IFNULL(VarbitCol, 'Y', 'N')) meets with the error "An
expression cannot contain a column of type VARBIT (2928)".
Does anyone know how I can figure out whether there's any data in that
column?
--
Larry