Solved

Grid problems

Posted on 1997-05-20
1
338 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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

772 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

11 Experts available now in Live!

Get 1:1 Help Now