select ID from #PopupCal_ProfileDB# where ID='#ID#' and Pswd='#Trim(encpwd)#' update #PopupCal_ProfileDB# set Validated=1 where ID='#ID#' AND Pswd='#Trim(encpwd)#'