Hi.
I am working on a prototype that will do a dbase search based on the date obtained from a user. The dbase has a date field that has the following mask MM/DD/YYYY HH:MM:SS.
This is the setup.
1. There is an ASP page that has Menu/Lists asking for the ff:
a. MM - integer type
b. DD - integer type
c. YYYY - integer type
2. The page from 1. goes to an ASP file that gets the form values for the month,day and year.
3. The target page uses a SQL query to view the date column that has the format of MM/DD/YYYY HH:MM:SS.
This is what I am getting.
1. When I test the recordset on the SQL query, I the values from the dbase.
2. When I try to view the page via a browser, I get an error message stating the ff error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in date in query expression 'COMMENT.CustomerName = 'testcustomer' and COMMTYPE.Customer_Comment_TypeTableID = 1 and COMMTYPE.Customer_Comment_TypeTableID = COMMENT.Customer_Comment_TypeTableID and COMMENT.Customer_Description_StatusTableID = STATUS.Customer_Description_St'.
/Prototype_2/TMP19hnq3hfat.asp, line 41
Note: All I am using to view the data is the Master-Detail page function. The SQL query when executed from the Recordset window generates data.
How can I solve the above issue?
I am putting my modified sql code in here for your perusal.
SELECT COMMENT.DateSubmitted, COMMENT.ClientName
FROM CUSTOMER_COMMENT COMMENT
WHERE
COMMENT.DateSubmitted > #varStartDate#
The Variables pane in the Recordset window has the ff:
Name: varStartDate
Default Value: 9/1/2002
Run-time Value:
Request.Form("StartMonth" & "/" &
Request.Form("StartDay" & "/" &
Request.Form("StartYear"
Thanks. Any help is greatly appreciated.
Carmina
I am working on a prototype that will do a dbase search based on the date obtained from a user. The dbase has a date field that has the following mask MM/DD/YYYY HH:MM:SS.
This is the setup.
1. There is an ASP page that has Menu/Lists asking for the ff:
a. MM - integer type
b. DD - integer type
c. YYYY - integer type
2. The page from 1. goes to an ASP file that gets the form values for the month,day and year.
3. The target page uses a SQL query to view the date column that has the format of MM/DD/YYYY HH:MM:SS.
This is what I am getting.
1. When I test the recordset on the SQL query, I the values from the dbase.
2. When I try to view the page via a browser, I get an error message stating the ff error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in date in query expression 'COMMENT.CustomerName = 'testcustomer' and COMMTYPE.Customer_Comment_TypeTableID = 1 and COMMTYPE.Customer_Comment_TypeTableID = COMMENT.Customer_Comment_TypeTableID and COMMENT.Customer_Description_StatusTableID = STATUS.Customer_Description_St'.
/Prototype_2/TMP19hnq3hfat.asp, line 41
Note: All I am using to view the data is the Master-Detail page function. The SQL query when executed from the Recordset window generates data.
How can I solve the above issue?
I am putting my modified sql code in here for your perusal.
SELECT COMMENT.DateSubmitted, COMMENT.ClientName
FROM CUSTOMER_COMMENT COMMENT
WHERE
COMMENT.DateSubmitted > #varStartDate#
The Variables pane in the Recordset window has the ff:
Name: varStartDate
Default Value: 9/1/2002
Run-time Value:
Request.Form("StartMonth" & "/" &
Request.Form("StartDay" & "/" &
Request.Form("StartYear"
Thanks. Any help is greatly appreciated.
Carmina