Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 empty value of ms access, asp, vbscript

Author  Topic 

Dilruba
Starting Member

2 Posts

Posted - 2007-11-17 : 11:30:33
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



dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2007-11-17 : 12:20:08
IsEmpty() or IsNull()
NULL and actualy empty are different then ""

http://www.w3schools.com/vbscript/func_isnull.asp
http://www.w3schools.com/vbscript/func_isempty.asp




Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page
   

- Advertisement -