OK, first here is the code:
sqlcmd = "SELECT space_available, ministry_id, pricing_id, min_group,
max_group FROM tbl_event WHERE event_id = " + int_event + " AND (event_year
= DATEPART(YYYY,GetDate()) OR event_year = (DATEPART(YYYY,GetDate()+1)))"
set rs = conn.Execute(sqlcmd)
IF rs("pricing_id") = 0 THEN
bln_group = "false"
ELSEIF rs("pricing_id") <> 0 THEN
bln_group = "true"
END IF
'This is the IF stmt that is giving me the problems
IF num_spaces > rs("space_available") THEN
bln_space = "false"
ELSEIF num_spaces < rs("space_available") THEN
bln_space = "true"
END IF
So, I am passing form data to this form, then doing a compare on some of the
values. I pull from the database the total number of spaces available for
the specified event and then compare that to the number of people they want
to send to the event to determine if there is space available. I know this
doesn't take into account if there are already registrations, that is the
next step, but for now the compare is failing. When I write out the values,
I get that the num_spaces is right, let's say 12 and the
rs("space_available") is right, 225, but the compare is wrong, it resolves
to bln_space="false". Now, I have been working on isolating this problem for
like 18 hours (pathetic, I know), so perhaps some fresh eyes/minds can see
where I have gone astray? Any input would be most appreciated.
Willie