E
Ed Richter
I'm trying to write a query that includes returning all records less than todays date. Everything in the query was working fine and returned desired results until I added the date criteria, so I'm certain that is where the problem is coming from. I added the response.write line as a test to make sure am returning results and that is correct. Most likely I think my problem is I need some formatting around the Todays_Date_is statement, maybe # or' or " or a combination of them in some order. I've tried however different formats without success.
I didn't show the rest of the code as I'm pretty certain the problem is in my format of the date field. In access the field, G_Date is formatted as date/time.
Todays_Date_is = Date()
response.write "todays date is: " & Todays_Date_is & "<P>"
Set rsObj= objConn.Execute("SELECT * FROM Current_schedule WHERE ( (First_L_Name LIKE '" & ref_L_name_value & "' OR Sec_L_Name LIKE '" & ref_L_name_value & "') AND (First_F_Name LIKE '" & ref_F_Name_value & "%' OR Sec_F_Name LIKE '" & ref_F_Name_value & "%') AND G_Date < Todays_Date_is ) ORDER BY G_Date ASC ")
Once the web page is displayed, I get the following. Evidently it's not passing on the date field?? :
todays date is: 3/13/2005
No value given for one or more required parameters.
/sports_ref_ratings/each_refs_ratings_posted.asp, line 154
Can anyone tell me how to format the date field properly?
I didn't show the rest of the code as I'm pretty certain the problem is in my format of the date field. In access the field, G_Date is formatted as date/time.
Todays_Date_is = Date()
response.write "todays date is: " & Todays_Date_is & "<P>"
Set rsObj= objConn.Execute("SELECT * FROM Current_schedule WHERE ( (First_L_Name LIKE '" & ref_L_name_value & "' OR Sec_L_Name LIKE '" & ref_L_name_value & "') AND (First_F_Name LIKE '" & ref_F_Name_value & "%' OR Sec_F_Name LIKE '" & ref_F_Name_value & "%') AND G_Date < Todays_Date_is ) ORDER BY G_Date ASC ")
Once the web page is displayed, I get the following. Evidently it's not passing on the date field?? :
todays date is: 3/13/2005
No value given for one or more required parameters.
/sports_ref_ratings/each_refs_ratings_posted.asp, line 154
Can anyone tell me how to format the date field properly?