David Laplante
Aug 29th, 2000, 08:40 AM
can someone tell me what is wrong here?? (this is connected to a ms sql database throught ODBC
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
I get the folowing error:
[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
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
I get the folowing error:
[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