The isnull function


The isnull function returns a value of type boolean, which indicates whether the parameter passed to it is null. If the parameter is null then the value true is returned, and if the parameter is not null then the value false is returned. This function is usually used to test values retrieved from databases with recordset.field.


The isnull function's only parameter is an expression of variant type.


The following code fragment uses isnull to check the values of the last_name and first_name fields to see if they are null, and if so handle them specially.

   new(rs);, 'select last_name, first_name from customer', rsforward);
   while not rs.eof
         if isnull(rs.field('last_name')) then
         write(', ');
         if isnull(rs.field('first_name')) then


Operating Systems: All
Standard Pascal: No