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

x
?
Solved

Grid problems

Posted on 1997-05-20
1
Medium Priority
?
360 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
[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
1 Comment
 
LVL 2

Accepted Solution

by:
javiertb earned 400 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
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