memo field problem...Help!

Results 1 to 2 of 2

Thread: memo field problem...Help!

  1. #1
    Join Date
    Dec 1969

    Default memo field problem...Help!

    I have a problem dealing with null memo fields. My memo field is the last field in my Access 2000 DB, and I am not using a select * in my sql string. heres my code,<BR><BR>&#060;%<BR>Dim desc <BR>desc = rsArticles("DESC")<BR>if (not desc = "") and (not isnull(desc)) THEN<BR>Response.Write "bla bla..........."<BR>Else<BR>Response.Write desc<BR>End If<BR>%&#062;<BR><BR>The problem is that I get a blank when the field is null. I want to get the first response.write statement to work. I get the correct Dbase reading when the field is not null, no problem with that. any help would be most appreciated.

  2. #2
    Join Date
    Dec 1969

    Default RE: memo field problem...Help!

    Try changing your code to this:<BR><BR>&#060;%<BR>Dim desc <BR>desc = rsArticles("DESC")<BR>if Len(desc & "") = 0 Then<BR>Response.Write "bla bla..........."<BR>Else<BR>Response.Write desc<BR>End If<BR>%&#062;<BR><BR>By appending a "" to the value you are testing, it deals with both Nulls and empty strings. Also testing Len is nice & quick.

Posting Permissions

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