Solved

Setrange not working on datetime field

Posted on 2014-01-15
2
514 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

Industry Leaders: 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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month3 days, 19 hours left to enroll

630 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