C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

TData v8 Refresh Problem

rated by 0 users
This post has 0 Replies | 0 Followers

Top 10 Contributor
Posts 89,785
newsgroup_archive Posted: Thu, Jan 12 2006 12:34 PM
This is a multi-part message in MIME format.

---=_vger543c69338
Content-Type: text/plain
Content-Transfer-Encoding: 7bit


Hello,

I'm having a weird problem refreshing a TData (v8) data control. Here's the situation:

1. I have a tdbGrid (v8) connecting to a TData. The TData is connected to an Access database.
2. I click on a row in the grid, highlighting it. I then click on a command button.
3. In the command button's click event, I then delete the indicated row from the database. However, I don't delete it directly through the recordset attached to the TData. Instead, the row is deleted directly from the underlying database (there are reasons it needs to be done this way).
4. The code then requeries the sourcerecordset of the TData and then refreshes the TData itself:

adoTest.SourceRecordset.Requery
adoTest.Refresh

5. However, the deleted row still appears in the tdbGrid. Stepping through the code and checking the RecordCount of the TData shows that it hasn't updated itself to reflect the deleted record.
6. Adding to my confusion is that if I display another form **in modal mode** and then refresh the TData upon closure of this other form, the TData refreshes itself appropriately. This only happens if the new form is a modal form.

I'm very confused. If anyone can tell me what I'm doing wrong, I'd be very grateful. Why does running a modal form suddenly make the TData's refresh work???

I've attached a stripped down project that contains just enough code to illustrate the problem.

Thanks in advance for any suggestions.

Cheers,

Eugene.
---=_vger543c69338

Click here to view the original newsgroup article (read only).

Page 1 of 1 (1 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.