Update database with a dataset



I have a dataset which contains data to replace (most of) the data in an
sqlserver database.
Currently I'm doing this by truncating the tables, and then using a
dataadapter.update() method call to insert the new data having instantiated a
SqlCommandBuilder object.

This works fine but I have to have insert permissions set on all the tables
in the db.

Is there some way of using one stored proc to facilitate the same end
result? Ideally I want all access to the database to go through stored procs
but I don't want to write a stored proc for every table that needs to be
updated (there's more than 50 tables).
Thanks
.



Relevant Pages

  • Re: Update database with a dataset
    ... SP to update data, but it is still would be a problem with the table name. ... will not be safe - you could face injection problem ... > sqlserver database. ... > but I don't want to write a stored proc for every table that needs to be ...
    (microsoft.public.data.ado)
  • Re: Update database with a dataset
    ... "Val Mazur (MVP)" wrote: ... >> sqlserver database. ... >> but I don't want to write a stored proc for every table that needs to be ...
    (microsoft.public.data.ado)