L
Larry Woods
Has anyone noticed that the VS Dataform wizard doesn't gen correctly
DISPLAYED results if you have an IDENTITY key defined for your table
(normal stuff, IMHO)? If your dataset is empty the first "Add" will display
TWO records on the resulting form. This is because they are creating a
'temporary' dataset with the changes; i.e., new record in this case, and
then they MERGE it into the existing dataset, which has a new row defined by
the 'currencymanager.AddNew' that was created when you pressed the Add
button (if you requested a single record format). In case you requested the
datagrid you get the bogus record displayed when you click 'Update.'
This behavior continues even after the first record; i.e., an additional
record is displayed. Of course, since the MERGE of the new record never
finds a record to merge into since it has a new IDENTITY defined for it,
which doesn't exist in the local dataset.
I've got to think that this has been pointed out to MS, or am I the only one
that has tried to use the wizard? (I like it for tables with LOTS of
fields. Saves time (?) )
Larry Woods
DISPLAYED results if you have an IDENTITY key defined for your table
(normal stuff, IMHO)? If your dataset is empty the first "Add" will display
TWO records on the resulting form. This is because they are creating a
'temporary' dataset with the changes; i.e., new record in this case, and
then they MERGE it into the existing dataset, which has a new row defined by
the 'currencymanager.AddNew' that was created when you pressed the Add
button (if you requested a single record format). In case you requested the
datagrid you get the bogus record displayed when you click 'Update.'
This behavior continues even after the first record; i.e., an additional
record is displayed. Of course, since the MERGE of the new record never
finds a record to merge into since it has a new IDENTITY defined for it,
which doesn't exist in the local dataset.
I've got to think that this has been pointed out to MS, or am I the only one
that has tried to use the wizard? (I like it for tables with LOTS of
fields. Saves time (?) )
Larry Woods