Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Grid problems

Posted on 1997-05-20
1
Medium Priority
?
361 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 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

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…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

926 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