can someone tell me what is wrong here?? (this is connected to a ms sql database throught ODBC
I get the folowing error:Code:rstCheckupCheques.Open "SELECT * FROM Cheque " & _ "WHERE Cheque_Recipient = '" & Recipient & _ "' AND Cheque_Date = #" & CDate(GetCgiValue("Cheque_Date")) & _ "# AND Cheque_Address = '" & Address & _ "' AND Cheque_Amount = " & Amount & _ " AND Cheque_Description = '" & Description & _ "' AND Cheque_FileNo = '" & FileNo & _ "' AND Cheque_Branch = '" & ChequeBranch & "'", DBConnection, adOpenStatic
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '#'. Error Number = -2147217900
I checked and GetCgiValue("Cheque_date") is not null or empty... it is a valid date
thanks


Reply With Quote
