Groups | Blog | Home
all groups > sql server (alternate) > november 2003 >

sql server (alternate) : Trigger on table-valued function?


Bruce Lester
11/28/2003 11:05:33 PM
Is there a way to create a trigger directly on an inline or multi-line table
value function?

I am trying to create a quick-and-dirty application using an Access Data
Project front-end with SQL 2000 SP3 EE.

Thanks.

Simon Hayes
11/29/2003 1:32:07 PM

[quoted text, click to view]

No - triggers are supported only on tables and views. Perhaps if you give
more information about the problem you're trying to solve, then someone may
be able to suggest a solution.

Simon

Bruce Lester
11/29/2003 7:10:12 PM
Simon, thanks for responding to my question. I am using an in-line
table-valued function to retrieve the 'child' records in a parent-child
Access Data Project form. The parent form sets the .recordsource property
of the child form whenever the current record on the parent form changes.
The child .recordsource property contains a function arguemnt constraint on
records that match the parent form.

Before using the table-function approach, I was using a view for the child's
SQL statement. The function approach is much faster than the straight SQL
method.

I want an audit trail of updates/inserts on the child record set so I
thought I would implement an insert/update trigger on either the view that
the table-function uses or the underlying table (since triggers are not
allowed on table-valued functions).

Thanks again for your help.

Bruce


[quoted text, click to view]

AddThis Social Bookmark Button