"unique table" problem
- From: "Keith G Hicks" <krh@xxxxxxxxxxx>
- Date: Tue, 28 Jun 2005 00:10:21 -0400
I understand that if a TadoDataset's command text is made up of joined
tables that if one wishes to delete records via the dataset (or rather the
grid it's associated with) you have to set the Unique Table property to the
table where you want the delete to occur. I understand that this needs to
be done *after* the dataset is made active.
I've done this and it works fine in one place. In this one place in code,
the dataset's command text is explicitly set and made active each time a
master dataset's row changes. There is no actual master/detail set up
between these two datasets using the IndexFieldNames, MasterFields and
Parameters properties. The detail's command text is reset in code each time
the master moves to a different record (on the master grid's
FocusedRecordChange event).
Here's the problem. It doesn't work in the place where I have master/detail
datasets that are actually using the master/detail configuration with
IndexFieldNames, MasterField and Parameters. That dataset is made active
when the form opens. I set the Unique Table property to the appropriate
table in the form create event just below teh dataset is made active. When I
try to delete from the associated grid, I get an error as if the Unique
Table were not set. Is there a property in the detail dataset that I need to
set to make this work correctly? If not, do I need to reset the Unique Table
every time the master changes rows?
With this problem and the record pointer moving problem I posted a few
minutes ago, I'm wondering if I'd be better off just using brute force and
going back to the stored procedure method. I hope I don't have to do that
though. There must be a way to make this work as desired! :-)
Thanks,
Keith
.
- Follow-Ups:
- Re: "unique table" problem
- From: Viatcheslav V. Vassiliev
- Re: "unique table" problem
- Prev by Date: abort delete problem
- Next by Date: Windows has no MS Access installed
- Previous by thread: abort delete problem
- Next by thread: Re: "unique table" problem
- Index(es):
Relevant Pages
|