?
Solved

Client dataset dumping records on set of IndexName

Posted on 2013-05-13
4
Medium Priority
?
497 Views
Last Modified: 2013-06-01
I have been working on a bit of code that loads data from 5 sources into a client dataset.  The data can then be indexed and manipulated to update the screen.  I ran into a spot in my code, while debugging, that set the CDS FilterName.  This should not be a problem but I noticed a watch I had setup to display the RecordCount property went from 1 to 0.  Can anyone tell me why a client dataset would behave like that?
0
Comment
Question by:developmentguru
[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
  • 2
4 Comments
 
LVL 32

Expert Comment

by:Ephraim Wangoya
ID: 39165588
RecordCount returns the count of records in the active view. Any record filtered out is not part of the count hence the difference in numbers.
0
 
LVL 21

Accepted Solution

by:
developmentguru earned 0 total points
ID: 39167627
There is no active filter at the time, I verified that.  The only change is to the index name.

I have found a work around.  It seems that if I delete all of the records on a client dataset with active indexes, then start adding records back, this happens.  Now, on each refresh, I dispose of the client dataset, recreate it, add all of the fields and indexes and create the dataset.  Once the client dataset has been recreated in it's structure I add back the records.

There is no problem now.  I was wondering if this solution might trigger any oher insights.  Is there a setting having to do with the indexing that might help?  Any other ideas?

I will leave the question open a while to give a chance for more input.
0
 
LVL 32

Expert Comment

by:Ephraim Wangoya
ID: 39200714
Hi developmentguru

Sorry could not keep up

How do you delete the records in the client dataset?
Have you tried
ClientDataset1.EmptyDataSet;
0
 
LVL 21

Author Closing Comment

by:developmentguru
ID: 39212591
No other solution was provided.  This is a solution, but I would have preferred a way of getting it to work without recreating the client dataset.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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 I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month10 days, 8 hours left to enroll

765 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