I need to count records that meet certain criteria. I thought this was very straightforward but I'm missing something.
sql = "SELECT COUNT(*) AS iTotal FROM studentsAll WHERE (lastName = '" & last_name & "' AND firstName = '" & first_name & "');"
textfile.WriteLine "<BR><B>SQL: </B> " & (sql)
textfile.WriteLine "<BR><B>Total: </B> " & iTotal
Nothing prints for iTotal. I've tried CInt(iTotal) and it always produces a zero.