Solved

Client dataset dumping records on set of IndexName

Posted on 2013-05-13
4
493 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
Tvertscrollbox like a whatsapp layout 5 64
Twebbrowser add css to the header 3 49
MS Access from Delphi 31 98
Delphi Seattle StructureView color 1 30
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…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

738 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