DeleteRows, sqloledb provider and views.

Erik Valdes <[email protected]> Thu, 27 Jun 2002 16:53:06 -0700
Newsgroups gmane.comp.windows.devel.oledb.devel
Message-ID <[email protected]>
Need some help here.  I'm discovering that if I create an oledb rowset based
on a select statement like "select * from myView"  where myView is a Sql
Server 2000 view that consists of at least 1 join, and I subsequently try to
delete a row from that rowset using IRowsetChange->DeleteRows(), that the
sql being sent to the server is not a single "delete from MyView..."
statement as one would expect, but separate "delete tableName" statements,
one for each table in the definition of myView.  Is there any way to change
this?  The whole point of setting up the view was to be able to use the
new-fangled "Instead Of" triggers to limit the delete to just one of the
tables.  However, if the Sql oledb provider doesn't actually call for a
delete from the view, then I'm out of luck.

Any help would be appreciated.

Erik Valdes.

You can read messages from the OLEDB_DEV archive, unsubscribe from OLEDB_DEV,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.