ASP error: Expected lexical element not found

Can anyone help? I have ASP querying from the Navision database that uses the date format as {d ‘YYYY-MM-DD’} . Now I’m getting error "Expected lexical element not found: " with the following code (where objRS is the recordset): set objRS = objConn.Execute(“SELECT No_, Entry_Date FROM Delivery_Order WHERE Available_Date = { d '” & DateYYYY & “-” & DateMM & “-” & DateDD & “’ }”) Can anyone tell what’s wrong?! Thanks!