Board index » delphi » "No current record" error

"No current record" error

Hi,

I have a Delphi 7 applications with a dxdbgrid component which is linked to
a Paradox table.  I'm now testing the application and most of the time it
works fine but very occasionally when I run a procedure which includes the
line:

dxDBGrid1.DataSource.DataSet.GotoBookmark(Pointer(dxDBGrid1.SelectedRows[i-1
]));
I get the message "No current record" and the program stops responding to
clicks on the dxdbgrid table.

The error seems to occur completely randomly but I think it must have
something to do with the GoToBookmark method.  Any ideas why this might be
happening?

Thanks a lot
Kate

 

Re:"No current record" error


In article <3f0e868...@newsgroups.borland.com>, k...@eortc.be (Kate

Quote
Moncrieff) wrote:
> Hi,

> I have a Delphi 7 applications with a dxdbgrid component which is
> linked to
> a Paradox table.  I'm now testing the application and most of the time
> it
> works fine but very occasionally when I run a procedure which includes
> the
> line:

> dxDBGrid1.DataSource.DataSet.GotoBookmark(Pointer(dxDBGrid1.SelectedRows
> [i-1
> ]));
> I get the message "No current record" and the program stops responding
> to
> clicks on the dxdbgrid table.

> The error seems to occur completely randomly but I think it must have
> something to do with the GoToBookmark method.  Any ideas why this might
> be
> happening?

> Thanks a lot
> Kate

You normally get this when a filter (or equivalent) and made the
bookmarked record drop out of the dataset.

Paul

Re:"No current record" error


Hi Paul,  it turned out it was happening every time I didn't properly make a
selection in the dxdbgrid table so thanks for the clue!

Quote
"Paul Toms" <pa...@navigator.co.uk> wrote in message

news:memo.20030711132909.10012i@paultoms.cix.co.uk...
Quote
> In article <3f0e868...@newsgroups.borland.com>, k...@eortc.be (Kate
> Moncrieff) wrote:

> > Hi,

> > I have a Delphi 7 applications with a dxdbgrid component which is
> > linked to
> > a Paradox table.  I'm now testing the application and most of the time
> > it
> > works fine but very occasionally when I run a procedure which includes
> > the
> > line:

> > dxDBGrid1.DataSource.DataSet.GotoBookmark(Pointer(dxDBGrid1.SelectedRows
> > [i-1
> > ]));
> > I get the message "No current record" and the program stops responding
> > to
> > clicks on the dxdbgrid table.

> > The error seems to occur completely randomly but I think it must have
> > something to do with the GoToBookmark method.  Any ideas why this might
> > be
> > happening?

> > Thanks a lot
> > Kate

> You normally get this when a filter (or equivalent) and made the
> bookmarked record drop out of the dataset.

> Paul

Other Threads