Guest_imported
New member
- Jan 1, 1970
- 0
Hello all,
I recently switched my active server pages from an Access 97 backend to a SQL server 7 backend . Yet now when I use this SQL statement :
strSQLQuery1 = "SELECT * FROM cocoitem WHERE CustNum = '" & strcustnum & "' AND (stat = 'O' OR stat = 'F') AND [due-date] > DateAdd('yyyy', -1, GETDATE()) Order By [cust-item], [due-date] ASC;"
I used to have the date() function before when I used Access 97 but changed it to GETDATE() when I went to SQl 7. Besides that everything is the same. Now I am getting an error like this:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Invalid parameter 1 specified for dateadd.
/scripts/order/shippingstatsopen.asp, line 28
Does anyone know how to fix this?
I recently switched my active server pages from an Access 97 backend to a SQL server 7 backend . Yet now when I use this SQL statement :
strSQLQuery1 = "SELECT * FROM cocoitem WHERE CustNum = '" & strcustnum & "' AND (stat = 'O' OR stat = 'F') AND [due-date] > DateAdd('yyyy', -1, GETDATE()) Order By [cust-item], [due-date] ASC;"
I used to have the date() function before when I used Access 97 but changed it to GETDATE() when I went to SQl 7. Besides that everything is the same. Now I am getting an error like this:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Invalid parameter 1 specified for dateadd.
/scripts/order/shippingstatsopen.asp, line 28
Does anyone know how to fix this?