Solved

Client dataset dumping records on set of IndexName

Posted on 2013-05-13
4
494 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

688 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