Forums

ASP

This topic is locked

How to make Null = 0 ?!?!?!

Posted 13 Jan 2002 01:16:55
1
has voted
13 Jan 2002 01:16:55 Joseph Marshall posted:
I have been trying to make NULL outputs = zero ... at first I thought I was successfull by using the nz() function within access ... but I guess these fuctions are unusable when pulling data through ASP .... so how exactly is this done?


thanks alot

Replies

Replied 13 Jan 2002 12:41:24
13 Jan 2002 12:41:24 Owen Eastwick replied:
Try something like:

<%
If myVar = "" Then
myVar = 0
End If
%>

Or

<%
If Request("myFormElement" = "" Then
myVar = 0
Ese
myVar = Request("myFormElement"
End If
%>

Or, if your using a value as a parameter in a recordset SELECT statement make 0 the default value.

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo

Reply to this topic