There are a couple of ways to take charge. The first is to look at the rows
in the DataSet and focus on changed rows and not new rows. This puts the onus
on the code.
The other method is to handle this in your database. There are two ways.
If you create a stored procedure to handle the INSERT/UPDATE, the only
difference between the two is one has the primary key filled in and the other
does not (if you are creating GUIDs in code, this will not work, of course).
Ignore those items without the primary key. Another variation (when you are
creating the key) is to check for the pre-existence of this key and pitch any
new items.
You can also create a trigger that does not allow inserts at all, but this
will be across all applications, so it is probably not useful.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"Jo Segers" wrote:
Hi,
Is it possible to allow updates in a dataset via a datagrid but no
inserts? Can somebody explain how?
Thanks in advance,
Jo Segers.