Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Nonsense error

Posted on 1997-04-14
3
Medium Priority
?
168 Views
Last Modified: 2010-04-06
     Hi. My problem is that I have a form where I show the user the information about the customers in a database. I have added to the form a navigator so the user can click and move in the table. But lastly, I am getting an error I don't understand. It seems that when I first show the form in the program and go to the last record by clicking the navigator's button, I get an error that says: 'Grid Index Out Of Range' ... and I don't have any grids on my form ! My surprise grows when I accept the error, close the form, open it again, go to the last record and then, I don't get the error! It's incredible, but I only get the error the first time I show the form. When I show it the second time and so on, nothing happens with that error. What is wrong with my form ? If I don't use a grid, why do I get that kind of error ?
0
Comment
Question by:sime
[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
3 Comments
 
LVL 2

Accepted Solution

by:
javiertb earned 120 total points
ID: 1335386
Here you have several options:

-Do not link at definition time more than one form to the same DataSet.

-Before making that call to the last record, set the datasource
Enabled property to false, then set it to True after calling Last record. If you're looping through several records at a time, set the Enabled property prior to entering the loop and reset it after leaving the loop.

-If you have hidden grids (for example on other tab pages) you may get the error when the database gets to the end.  The easiest way to avoid the error is to use the onshow events of the tab pages or forms to enable the grid and the onhide event to disable the grid, this way the error doesn't seem to happen.

Hope this helps
0
 
LVL 2

Expert Comment

by:javiertb
ID: 1335387
Are you going to evaluate my answer or not??
0
 

Author Comment

by:sime
ID: 1335388
Great answer, thanks for all.
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

670 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