Board index » delphi » You've seen this before...AAARRGH!

You've seen this before...AAARRGH!

Just when I thought it was going so well....
  I used to get an error message when using the Navigation component to
browse to the end of a Table - "Grid Index out of Range".  I modified the
project to use a data module and that seemed to take care of the problem.
  Recently, I added one column to my table and now the problem has
returned.  What can I do to correct this problem?

 

Re:You've seen this before...AAARRGH!


Did you try rebuilding the TField list in your TTable is your created them
in the first place?
--
Matthew J. Brock
Computer Solutions:AZ
Tucson, AZ

LancePKing <lancepk...@aol.com> wrote in article
<19961227213100.QAA23...@ladder01.news.aol.com>...

Quote
> Just when I thought it was going so well....
>   I used to get an error message when using the Navigation component to
> browse to the end of a Table - "Grid Index out of Range".  I modified the
> project to use a data module and that seemed to take care of the problem.
>   Recently, I added one column to my table and now the problem has
> returned.  What can I do to correct this problem?

Re:You've seen this before...AAARRGH!


Quote
In article <19961227213100.QAA23...@ladder01.news.aol.com>, lancepk...@aol.com (LancePKing) wrote:
>Just when I thought it was going so well....
>  I used to get an error message when using the Navigation component to
>browse to the end of a Table - "Grid Index out of Range".  I modified the
>project to use a data module and that seemed to take care of the problem.
>  Recently, I added one column to my table and now the problem has
>returned.  What can I do to correct this problem?

I also ran into this problem.  In my case, I had a dbgrid that required a
horizontal scroll bar as well as a vertical scroll bar.  When I re-sized my
grid so that a horizontal scroll bar was not needed, the problem went away.  

Has the extra field now required the horizontal scroll bar?  If so, can you
re-size the grid to eliminate it?

Good luck.

--
Bob McClintock

Re:You've seen this before...AAARRGH!


Quote
In article <19961227213100.QAA23...@ladder01.news.aol.com>, lancepk...@aol.com (LancePKing) wrote:
>Just when I thought it was going so well....
>  I used to get an error message when using the Navigation component to
>browse to the end of a Table - "Grid Index out of Range".  I modified the
>project to use a data module and that seemed to take care of the problem.
>  Recently, I added one column to my table and now the problem has
>returned.  What can I do to correct this problem?

I also ran into this problem.  In my case, I had a dbgrid that required a
horizontal scroll bar as well as a vertical scroll bar.  When I re-sized my
grid so that a horizontal scroll bar was not needed, the problem went away.  

Has the extra field now required the horizontal scroll bar?  If so, can you
re-size the grid to eliminate it?

Good luck.

--
Bob McClintock

Re:You've seen this before...AAARRGH!


Quote
>  I used to get an error message when using the Navigation component to
>browse to the end of a Table - "Grid Index out of Range".  I modified the
>project to use a data module and that seemed to take care of the problem.
>  Recently, I added one column to my table and now the problem has
>returned.  What can I do to correct this problem?

Do you get the problem when you are Show-ing the form?

I had the same problem. The reason for my problem was that I had two forms,
each with a grid. If I hide one of the forms, and showed the other, I woud get
the error message "Grid Index out of Range". I think this is a bug in Delphi.

My solution was to either show both forms, ore close the first form, and not
just hiding it.

Holger

Re:You've seen this before...AAARRGH!


Quote
>holg...@online.no (Holger Hansen)
>>  I used to get an error message when using the Navigation component to
>>browse to the end of a Table - "Grid Index out of Range".  I modified
the
>>project to use a data module and that seemed to take care of the
problem.
>>  Recently, I added one column to my table and now the problem has
>>returned.  What can I do to correct this problem?
>Do you get the problem when you are Show-ing the form?
>I had the same problem. The reason for my problem was that I had two
forms,
>each with a grid. If I hide one of the forms, and showed the other, I
woud get
>the error message "Grid Index out of Range". I think this is a bug in

Delphi.

Quote
>My solution was to either show both forms, ore close the first form, and
not
>just hiding it.

No - I only seem to get the error when reaching the last record in the
table via a call to last or through the use of the navigator component.
What is even worse, I can delete all data and start fresh.  There are no
errors during the next session where I add all the records I desire.  But
when I load up the program the second time, BANG!  the last record brings
the out of range message.

I have re-written all the code in my main unit by creating a second
project and new data module.  For some reason this fixes the problem for
now.  Maybe I should have just deleted all the .dcu files , , , I know
that C++ often has a problem with using precompiled headers (both Borland
and MS).

Other Threads