Solved

Setrange not working on datetime field

Posted on 2014-01-15
2
507 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

734 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