Solved

Setrange not working on datetime field

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

825 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