empty value of ms access, asp, vbscript

Author Message
Dilruba

  • Total Posts : 5
  • Scores: 0
  • Reward points : 0
  • Joined: 11/12/2007
  • Status: offline
empty value of ms access, asp, vbscript Saturday, November 17, 2007 4:06 PM (permalink)
0
How we can recognize an empty value of ms access field.

suppose :
[CODE]Dim empVal, empVal1, num
num = 0
empVal = Recordset.Fields.Item("subj").Value
empVal1  = Recordset.Fields.Item("org").Value[/CODE]
here empVal = "" and empVal1 = "" i. e. in the database there are no value i.e. empty
so if i wrote
[CODE]If ( (empVal = "") AND (empVal = "") ) Then
 num = num + 1
 response.write num
 response num
end if [/CODE]
here value should show "1"
But it is not entering within the if condition.
So, how can we evaluate the value of empty
 

 
 
#1
    ehvbs

    • Total Posts : 3321
    • Scores: 110
    • Reward points : 0
    • Joined: 6/22/2005
    • Location: Germany
    • Status: offline
    RE: empty value of ms access, asp, vbscript Saturday, November 17, 2007 9:55 PM (permalink)
    0
    Hi Dilruba,

    use the VBScript Docs to read about IsNull().


     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9