Re: DeleteRows, sqloledb provider and views.

"Roger Kaiser Jr." <[email protected]> Fri, 28 Jun 2002 06:50:34 -0400
Newsgroups gmane.comp.windows.devel.oledb.devel
Message-ID <[email protected]>
Maybe try issuing the sql text command "Delete myView where blah blah
blah" command instead of using the IRowsetChange interface?

-----Original Message-----
From: OLEDB_DEV [mailto:[email protected]] On Behalf Of Erik
Valdes
Sent: Thursday, June 27, 2002 7:53 PM
To: [email protected]
Subject: [OLEDB_DEV] DeleteRows, sqloledb provider and views.


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.

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