G
Guest
hi
is it possible to fill a dataset such that it can be done in increments?
for instance, if I have a large table with a big schema (like 50 columns -
for whatever reason), could I fill a dataset table with a partial query like
(via a dataadapter
SELECT key_value, name, address, phone, zip FROM bigtable
to display in a grid, then when wants details, use a different command on
the same adapter like so
SELECT * FROM bigtable WHERE (key_value = ?)
and have it fill in the rest of the record.
The first time, the missing fields are null (I've done this and it works).
If I attach the second select command and do a
"myDataAdapter.Fill(aDataSet), it goes into a dead run doing something.
Seems like I should be able to select new records into the dataset by
tactical select statements without a whole lot of overhead. If this were
true, then I could test a record value to see if its been loaded, and kind
of do a lazy init of the dataset. However, I'm also curious what would
happen on an update. Probably better off have two instances of the same
type dataset, one with short query and one with the full.
what do you think?
Bill
is it possible to fill a dataset such that it can be done in increments?
for instance, if I have a large table with a big schema (like 50 columns -
for whatever reason), could I fill a dataset table with a partial query like
(via a dataadapter
SELECT key_value, name, address, phone, zip FROM bigtable
to display in a grid, then when wants details, use a different command on
the same adapter like so
SELECT * FROM bigtable WHERE (key_value = ?)
and have it fill in the rest of the record.
The first time, the missing fields are null (I've done this and it works).
If I attach the second select command and do a
"myDataAdapter.Fill(aDataSet), it goes into a dead run doing something.
Seems like I should be able to select new records into the dataset by
tactical select statements without a whole lot of overhead. If this were
true, then I could test a record value to see if its been loaded, and kind
of do a lazy init of the dataset. However, I'm also curious what would
happen on an update. Probably better off have two instances of the same
type dataset, one with short query and one with the full.
what do you think?
Bill