Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9090

Using dates as parameters against a FoxPro database

$
0
0

I'm building a report which requires a date range against a FoxPro database.


I've entered the starting and ending dates a parameters.

 

I've entered them in the select statement as follows:

 

{due_dts.due_dts} in {?StartingDate} to {?EndingDate}

 

When I run the report I get the response "Failed to retrieve date from the database"

 

and then a secondary error message box with:

Details: ADO Error Code: 0x

Source: Microsoft OLE DB Provider for Visual FoxPro

Description: SQL: Column 'DATETIME" is not found.

Native Error: [Database Vendor Code: 806:]

 

I found an article which describes the issue at http://www.hexcentral.com/articles/crystal-date-error.htm

It talks about how SQL runs a Convert instruction which is not compatible and formatting the date as

DateTime (yyyy,mm,dd,hh,mm,ss).  I tried doing this with the parameter as follows:

{due_dts.due_dts} in DateTime({?StartingDate},0,0,0) to DateTime({?EndingDate},0,0,0)

but now I'm getting "A time is required here" when I try to save the select expert.

 

I was able to run the report with fixed dates using:

{due_dts.due_dts} in DateTime (2014,08,01,0,0,0) to DateTime (2014,09,01,0,0,0)

but I need the data parameters.

 

It appears to be a formatting issue of the date entered through the parameter screen.  How can I change that?

 

Thanks,

 

Paul


Viewing all articles
Browse latest Browse all 9090

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>