Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date problem with Foxpro data 1

Status
Not open for further replies.

RSfromCO

Programmer
May 3, 2002
149
US
I am new to using Crystal... and I don't normally use FoxPro as a datasource, but that's what I have to deal with here. I am using Crystal version XI.

I have a simple report that runs until I try to limit the selected records for the report using a date field.

Using the "Select Expert" with the date field highlighted, I tried setting the dates to include to "is greater than" a specific date. If I select "Show Forumula" this is what is displayed..

{ltusers.status} = "Active" and
{ltvisit.visit_date} > Date (2005, 05, 11)

When I try to run the report it says it "Failed to retrieve data from the database".

ADO Error Code:0x80004005
Source: Microsoft OLE DB Provider Visual FoxPro
Description: SQL: Column 'DATETIME' is not found.

Since I know there is no column in the table called DATETIME, I assume that crystal is trying to call a function called DATETIME that perhaps doesn't exist with FoxPro tables????
 
Try using:

(
{ltusers.status} = "Active"
)
and
(
{ltvisit.visit_date} > cDatetime (2005, 05, 11,0,0,0)
)

Or it may be that you're experiencing a keyword issue within the driver.

What happens if you you click the field and select Browse Data?

Are you using the MS VFP ODBC driver, or an OLE DB connection, or?

Check for an updated driver.

-k
 
Thanks. The cDateTime function seems to have resolved the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top