Hi All,
Over the past year or so, I've gotten further in to some of the specifics of
VBScript/ASP scripting and I'm having a difficult time getting a definite
answer in regards to searching for an empty or un-occupied string or number.
If anyone is interested in helping, I've listed some of the examples that I
need clarification/correction on:
1) If the value is alphanumeric (VARCHAR), will the following work best?
strValue <> ""
Or
strValue = ""
2) If it is numeric/integer/bit (int, bigint, numeric, etc.), or any other
number-only format, is isNull the correct comparrison?
Not IsNull(intValue)
Or
IsNull(intValue)
3) For the following example, if 'COL1' were part of a recordset that
returned values from other columns, but it itself had no value, would it
still be returned as NULL or as ""?
Dim intNumber
intNumber = 0
If Not IsNull(sp.parameters.item("@COL1").value) Then
intNumber = sp.parameters.item("@COL1").value
End If
If you assign a numeric value as response.cookies("number") or as
session("number") or as a variable="number", then will it maintain it's
original datatype, or does it become string? If it becomes string, does all
conversion have to occur when reading that session variable/cookie, or is
there an alternative?
Anyway, I appreciate the help of anyone wishing to respond.
Thanks,
Curt Morrison
c u r t m o r r i s o n @ y a h o o . c o m