Hi, if anyone can help or point to a forum message which already has an answer to this I'd be grateful.
I've got an SQL query, which is built from numeric parameters passed by a form:
rsSQL = "SELECT COUNT(*) AS count FROM calendar WHERE Year=" & request.form("selYear") & " AND Month=" & request.form("selMonth") & " AND Day=" & request.form("selDay")
However the following will not open the recordset:
DB.Open rsSQL, DB_CONNECTIONSTRING, adOpenStatic, adLockPessimistic
Can anyone advise?! If I change the rsSQL statement to, for example:
rsSQL = "SELECT COUNT(*) AS count FROM calendar WHERE Year=2003"
everything works fine. Grr...
** Update - fixed. Was passing an empty value which caused the problems. A lesson to be learnt for sure...