[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

dBase DBF files and TDBGrid

Posted on 2002-04-11
4
Medium Priority
?
385 Views
Last Modified: 2010-04-04
If I create a dBase III DBF file, and create an index with this DBF, and then use Delphi 3 with a TDBGrid component, I notice unusual behavior with the TDBGrid whenever the Index is active.

Example, let's say the DBF contains 1000 records.  When my D3 application is running, and the table is active, and the index is active, the only positions that you can move the thumb tracking button in the vertical scroll bar is: TOP, MIDDLE, BOTTOM (0%, 50%, 100%).   It is impossible to move the thumb button to 25% or 75% or 33%.  However, if I DROP the index (make it inactive), then I CAN move the thumb button to intermediate positions (10%, 25%, etc.).

Why is this, and how can I use an index with my DBF while at the same time be able to have better thumb button tracking control over the table?
0
Comment
Question by:Kapusta
[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 27

Accepted Solution

by:
kretzschmar earned 160 total points
ID: 6934180
thats not only with dbase-files,
this bahaviour is because the dataset self don't
knows how much records are there,
therefore the tdbgrid is unable to scale the scrollbar

just in simple words

meikl ;-)
0
 

Author Comment

by:Kapusta
ID: 6934888
Why can't it know how many records there are?  How tough is it to perform a lookup to the .RecCount property?  And why if I drop/deactivate the index then the thumb button DOES behave properly?  How can the TDbgrib able to know the # of records when the index is deactivated but it doesn't know the # of records when the index is active?  That doesn't make sense!
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6936383
hehe :-)

well it sounds like an paradoxon,
but the access without index is another than with index,

with index the bahaviour is like on a sql-database,
the fetches comes in parts until the sql-server signals the last fetch, until then the recordcount is unknown.

it may help, to call the last-method followed by the firstmethod after open the table to force fetching all records, some datasets are providing a fetchall-method.

meikl ;-)
0
 

Author Comment

by:Kapusta
ID: 6936654
I came across the following possible solution:

http://www.jpmartel.com/bu15_c.htm
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

649 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