Solved

Setrange not working on datetime field

Posted on 2014-01-15
2
498 Views
Last Modified: 2014-01-16
I have a datetime field in a clientdataset which I have added an index to but when I attempt to apply cliendataset.setrange([mystartdate],[myenddate]) it results in no records.

What am I doing wrong?

Thanks for your help

Daniel
0
Comment
Question by:DanielManchester
2 Comments
 
LVL 19

Accepted Solution

by:
Thommy earned 500 total points
ID: 39784564
Have tried out setting range on date fields without any problem:

ClientDataSet1.IndexFieldNames:='EXPIRY_DATE';               //a date field from an Oracle table
ClientDataSet1.SetRange([StrToDateTime('01.01.1999')],
                                            [StrToDateTime('31.12.2001')]);

Are you sure your range matches any records in your indexed table?

Can you please post part of your code?
0
 

Author Closing Comment

by:DanielManchester
ID: 39786140
Setting the indexfieldname value fixed the problem.  Thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi Dbf export problem to a Visual Foxpro application 6 234
Delphi : could not find program, '...exe' 2 217
Reconfigure Delphi Install? 2 66
SUM 2 INTEGER ARRAYS INTO 1 10 111
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question