|
skywalk22 -> RE: SQL DATE QUERY - problem (10/21/2004 14:46:59)
|
Did dupati ever get his problem to work? I am having problems with the same issue. I am using SQL server 2000 with FP 2003 and DRW. Here is my query: select dispatch.dispatch,dispatch.recdate,dispatch.complete,dispatch.invoice,salesled.prod,salesled.price,salesled.tax1 from (salesled inner join sales on salesled.invoice=sales.invoice)inner join dispatch on dispatch.dispatch=sales.dispatch where Sales.invdate between '" & startdate & "' and '" & enddate & "' and salesled.prod <> 'HIST' order by dispatch.dispatch startdate and enddate are form data that getspassed from the posting page. I know the values are getting past b/c I can do do a request.form= and get the results to post, I have even tried putting the values in a variable and putting the variable in the SQL query. Also tried cdate(variable) before putting them into the query. When I put '10/15/2004' and '10/20/2004' into the query instead of startdate and endate.....it works perfect. Don't know what else to do. I always get this error: Database Results Wizard Error Description: Syntax error converting datetime from character string. Number: -2147217913 (0x80040E07) Source: Microsoft OLE DB Provider for SQL Server
|
|
|
|