Re: Updatable View with ADO and Trigger INSTEAD OF

From: Val Mazur (group51a_at_hotmail.com)
Date: 02/26/05


Date: Fri, 25 Feb 2005 21:09:56 -0500

Hi Martino,

By default ADO/ADO.NET will generate INSERT SQL statement based on
information it has and most likely it will use information for the base
table(s) to build this statement. What you could do is to use explicit SQL
statements in ADO with the Command object to execute actual INSERT
statements. In ADO.NET you could specify same INSERT statement for your
DataAdapter (InsertCommand property).

-- 
Val Mazur
Microsoft MVP
http://xport.mvps.org
"Martino" <martino.pavone@cezannesw.com> wrote in message 
news:efGcP2xGFHA.2704@tk2msftngp13.phx.gbl...
>I have created a view on a base table and I have added a INSTEAD OF Trigger 
>to insert values on the base table.
>
> I noted that ADO and ADO.NET insert values on the base table and not in 
> the view.
>
> Is there a vay to force ADO to generate insert for the view and not for 
> the base table?
>
> Thanks in advance.
>
> Martino
>
>
> 


Relevant Pages

  • Re: ADO Behaving VERY badly...
    ... > VB6 and VBScript to retrieve ADO Recordsets for a number of individual SQL ... > two second pause, and a few more statements will execute, then another ... It's not dependent on the SQL statement being issued, ... This database is pretty tight, normalized, and indexed ...
    (microsoft.public.data.ado)
  • filling a dataset with two tables using a single query
    ... Consider a SQL statement like this: ... In ADO, the following code will locate the record and if found, update both ... in two separate trips to the DB. ... Load the resultset as an untyped dataset or use a datareader. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: ADO Timestamps
    ... not worry about date and time format conversion if you use ADO. ... if you need to execute SQL statement all you need to do is to use Command ... If you declare datetime parameters using proper datatype then it ...
    (microsoft.public.vb.database.ado)
  • Re: SQL string problem
    ... You must "escape" any single quotes when sending SQL statements directly to ... SQL Server via ADO. ... Just pass your SQL statement through this function when opening your ... > truncated and is not passed to SQL server 2000 in a complete form. ...
    (microsoft.public.excel.programming)