Delphi7/ADO/SQL Server 2000 TDBGrid problem
From: Robert Carrington (rcarrington_at_ice-sys.co.uk)
Date: 06/16/04
- Previous message: Del Murray: "Re: Passing value list as parameters"
- Next in thread: Morpheus: "Re: Delphi7/ADO/SQL Server 2000 TDBGrid problem"
- Reply: Morpheus: "Re: Delphi7/ADO/SQL Server 2000 TDBGrid problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 16 Jun 2004 14:37:15 +0100
I have 1 TDBGrid component and multiple TADOQuery objects that can be
connected to it.
Depending on where grid is accessed from a different query is connected to
it. These queries are always open in the background regardless.
The problem is that sometimes when trying to select a row in the grid it
actually selects a completely different row. 2 indicators are shown on the
indicator column as well. These can only be got rid of by selecting the row
that was initially selected.
This usually happens after the TDBGrid.DataSource.DataSet has been swapped
several times and then returns to a dataset that has been open in the past.
Is this a bug that anyone else has come across? I agree that it is not a
particularly good method of doing things but it is still doing something
that is apparently allowed by Delphi and it is not throwing any errors.
Also there should be no possible way for a row other than the one you click
on to be selected. I would be interested if anyone else has/is able to
replicate this as I have not seen anything about this on the net.
I have tried various methods of refreshing/repainting and cannot get
anything to work.
NOTE:
1. I cannot just rewrite the code as it would have too large an impact on
the rest of the program.
2. I cannot just close the query and reopen it as I wish to retain the
position in the query. ).
- Previous message: Del Murray: "Re: Passing value list as parameters"
- Next in thread: Morpheus: "Re: Delphi7/ADO/SQL Server 2000 TDBGrid problem"
- Reply: Morpheus: "Re: Delphi7/ADO/SQL Server 2000 TDBGrid problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|