Solved

Grid problems

Posted on 1997-05-20
1
341 Views
Last Modified: 2010-04-04
I am writing a program to enroll students and  I'm having a big problem. i am using a datamodule in which I put all my tables. If I enroll students i alter my course and student table. They are linked on each other with a nr ( key in student) Student is the master table. When i couple 2 Dbnav on these tables and there is more than one course for one student I get an EInvalidGridOperation =>> Grid index out of bounds/date/invalid. I solved this by putting two table componenets on the form where this is necessary and now it works. What causes this problem???
Please help me, it's for my final report....
0
Comment
Question by:Jens204
1 Comment
 
LVL 2

Accepted Solution

by:
javiertb earned 200 total points
ID: 1336496
I've experienced the same problem some times and it seems to be one of those Delphi bugs, but here you have several options which may help you:

   -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.

I've been also talking with people about the same proble and they got to solve it by checking what I stated before.

Hope this helps
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Convert Jpg /PNG To GIF 5 120
Newbie Thread Programming 1 139
Can Viruses spread while transferring Binary data with Winsock 2 66
How to debug For loops? 3 45
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

910 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now