c#


Filter Table Triggers when using SMO DependencyWalker


I have a database with numerous tables that I use the SMO DependencyTree and DependencyWalker to order them by dependencies and then script them out. However, there are two particular tables that have the following relationship:
CREATE TABLE Production_Events (
Event_Id int identity(1,1) NOT NULL,
Start_Time datetime NOT NULL,
End_Time datetime null
--... other columns
)
CREATE TABLE Production_Event_Data (
Production_Event_Data_Id int identity(1,1) NOT NULL,
Event_Id int NOT NULL, -- Foreign key to the above table
Variable_Id int NOT NULL, -- Foreign key to another table
Variable_Value varchar(25) NULL
--... other columns
)
The Production_Event table has a FOR INSERT trigger which populates the Production_Event_Data table with values that come from various sources when a new row is inserted in Production_Event.
If there is no trigger present on the Production_Event table, the DependencyWalker will properly order these tables for scripting by detecting the Foreign Key relationship between them. However, if the trigger is present, then DependencyWalker sees the trigger as a dependency and orders the tables incorrectly by putting the Production_Event_Data table before the Production_Events. Ultimately this will end with a Foreign Key Constraint error if you try to execute the script.
Is there a way to configure DependencyWalker to only account for table dependencies and NOT trigger dependencies?

Related Links

What's the deal with the version number attached the name of the dll?
How would you invoke an event with reflection?
Conditional Compile of Generic Methods
VS WinForm designer always changes custom constructor?
Run C# application from cmd
Knowing the status of a very long function (execution time) in another class [closed]
Add a single row containing text taking up entire area of WPF Datagrid
CGBitmapContext in MonoTouch throws invalid handle exception
Create a list to display the contents of a dictionary?
Get file to FileStream from remote path with another user credentials
Implementing the min & max function with group by and having in linq
JSON or HTML returned from webmethod
BackgroundWorker doesn't handle exception
Implementing C++/clr's auto_handle functionality in C#
Get Children from ListBox can't get children that haven't been viewed
DelegatingHandler for response in WebApi

Categories

HOME
asterisk
qemu
wifi
window.open
boxplot
coordinates
confluence-rest-api
virtualhost
rethinkdb
restheart
obd-ii
google-my-business-api
suitecrm
osclass
virtualenv
derby
react-select
webseal
popup
openstack-horizon
infopath
nsoperation
android-actionbar
hapijs
views
gomobile
handle
nsopenpanel
traveling-salesman
adobe-captivate
angular-schema-form
concrete5
mobile-development
mplab
ragel
scalamock
latency
ui-grid
mixed-models
colorbox
opos
hdpi
history
django-tables2
monaca
standard-error
sharpssh
spring-cloud-aws
turbolinks
android-tabs
settext
altova
airwatch
hotkeys
php-java-bridge
phpdesigner
mod
custom-build-step
jersey-test-framework
dday
clear
personality-insights
roslyn-code-analysis
system.diagnostics
applinks
ios-enterprise
oxygenxml
disabled-control
facebook-java-api
scidb
infinity.js
codeigniter-form-helper
blotter
idoc
gssapi
openafs
hypertable
animationdrawable
openwrap
mismatch
lgpl
qprocess
webdb
large-data-volumes
paperless

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App