[thelist] Simple string comparison -- plz help
Brian Cummiskey
Brian at hondaswap.com
Wed Jan 19 16:22:39 CST 2005
Brian Delaney wrote:
> In sql YorN is defined as a char, 10 allow NULL. There is either a N or
> Y in the field.
>
This probably isn't your problem-- but a char should only be used in a
controlled field of X-length. for example, 10 for a phone number, 9 for
a zipcode + 4, etc.
otherwise, you really should use varchar. in this case, char(1) is all
you need.
If you want to make it more semantic, using a boolean field would be
ideal. this is, afterall, a True/false response field.
> vAnswer = rsStuff("YorN")
well, if it always fails, What IS vAnswer?
response.write vAnswer
see what it is. if its a 'Y' and it fails, you have script problems.
if its nothing, its going to fail- and that means you have a problem
with your record set pulling a row properly.
More information about the thelist
mailing list