I have a form with a DBGrid to the left and a DBRichEdit on it to the right. The grid lists all current result set and the DBEDit will show the text of the current record.
DBRichEdit1 points to DataSource dsReview which is a TQuery. The DBRichEdit has DataField set to 'Text' (which is the name of the field in the table, badly named, I know).
This is querying from a Paradox table. There is an edit box where you can type in part of the key value of the record you want to display. The OnChange event on that Edit box basically re-executes the SQL statement after each letter.
After each execution of the OnChange event, the pointer is at the first record in the grid. Sometimes, the very first record shows no data in the RichEdit field. If I scroll down to the next record, it displayes the text just fine, but coming back to the first record again still shows me nothing.
The query basically looks like this:
select field1, field2, field3, a.text, field4
from table a
where upper(card_name) like "%' + uppercase(edtQuickFilter.Text) + '%"
I can type a long key name and watch the text in the first record come and go - it's very strange and I can't see why it's happening.
Could it be because of the badly named field that's causing some confusion? I really don't want to have to rename the field, but if you think it helps, I might have to.
Anyone seen anything like this before?
Using Delphi 5 Professional Update Pack 1 Build 6.18, running on Windows XP Professional.
Any help appreciated.
Thanks
Steve
stephen.wales@riotinto.com
DBRichEdit1 points to DataSource dsReview which is a TQuery. The DBRichEdit has DataField set to 'Text' (which is the name of the field in the table, badly named, I know).
This is querying from a Paradox table. There is an edit box where you can type in part of the key value of the record you want to display. The OnChange event on that Edit box basically re-executes the SQL statement after each letter.
After each execution of the OnChange event, the pointer is at the first record in the grid. Sometimes, the very first record shows no data in the RichEdit field. If I scroll down to the next record, it displayes the text just fine, but coming back to the first record again still shows me nothing.
The query basically looks like this:
select field1, field2, field3, a.text, field4
from table a
where upper(card_name) like "%' + uppercase(edtQuickFilter.Text) + '%"
I can type a long key name and watch the text in the first record come and go - it's very strange and I can't see why it's happening.
Could it be because of the badly named field that's causing some confusion? I really don't want to have to rename the field, but if you think it helps, I might have to.
Anyone seen anything like this before?
Using Delphi 5 Professional Update Pack 1 Build 6.18, running on Windows XP Professional.
Any help appreciated.
Thanks
Steve
stephen.wales@riotinto.com