Solved

Setrange not working on datetime field

Posted on 2014-01-15
2
477 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
Comment Utility
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
Comment Utility
Setting the indexfieldname value fixed the problem.  Thanks
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now