ASP help please
can anyone see whats wrong with this code, its working when the sql is met but not when it supposed to retorn resulf of zero<%
sql = "SELECT SUM(amount) AS Total FROM payment WHERE partner_id = '" & ref_id & "' AND datex = '" & datex & "' "
set RS = DbConn.Execute(sql)
if not (RS.BOF and RS.EOF) then
Total = RS(0)
Else Total = 0
end if
Response.Write ("Total Page Hits = " & Total)
%>