Solved

Grid problems

Posted on 1997-05-20
1
354 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

685 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