The wierd and wacky....

Results 1 to 6 of 6

Thread: The wierd and wacky....

  1. #1
    Jason Guest

    Default The wierd and wacky....

    This is making NO sense...<BR><BR>Do while not objRS.eof<BR> Response.Write objRS("Keywords") - this outputs text<BR> If NOT IsNull(objRS("Keywords")) Then<BR> Response.Write objRS("Keywords") - this does not!<BR> End If<BR> objRS.movenext<BR>Loop<BR><BR>This is driving me crazy. Both of those Writes should output the same thing, if they are not NULL. Now, &#039Keywords&#039 is a MEMO datatype (Access 2000). If I change it to a TEXT datatype, the above code works (writes out of the IF and in the IF) What is up????

  2. #2
    j Guest

    Default RE: The wierd and wacky....

    NULL is NOT the same thing as "". Are you sure you are returning a NULL field rather than an empty field?

  3. #3
    Jason Guest

    Default RE: The wierd and wacky....

    Yes, this is not a NULL problem. A datafield which is empty in a database returns NULL. Period. The issue here is this code acts differently depending on the datatype which is defined - TEXT vs MEMO

  4. #4
    J Guest

    Default RE: The wierd and wacky....

    Acutally, in SQL Server anyway, &#060;NULL&#062; and an empty field are not the same thing. &#060;NULL&#062; is actually a place holder. Try this...<BR>IsNull("") - it should return false.

  5. #5
    Jason Guest

    Default RE: The wierd and wacky....

    NULL and empty are differnet. NULL is uninitialized, empty is initialized. I&#039ve run a &#039vartype&#039 dump on the fields and they all contain NULLS or strings. Nothing else. So the issue of IsNull or IsEmpty doesn&#039t exist. The issue is, for some reason the MEMO datatype doesn&#039t behave properly after an IsNull call.<BR>

  6. #6
    Join Date
    Dec 1969

    Default Sick and twisted

    Access (sigh)<BR><BR>Try assigning to a variable before testing.<BR>strKeywords = objRS("Keywords") <BR>then do all your other stuff with the variable.<BR><BR>Does it help?<BR>Wonder why?<BR>Is the memo the last field in the select?<BR><BR>There is a problem with memo field in access;once they have been used once, the will appear to empty. I think it is less prevalent if it is the only memo field and the last field.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts