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

How to update a TextView text (decode text effect)?
C# faculty : weird results [duplicate]
Which MVC version to start with [closed]
What is “88-type” in C# and how can i use it?
C# Regex to convert yyyyMMddhhmm
EntityFramework package version=“6.1.3” and Web config version 6.0.0.0?
How to read a binary formatted string from a file?
Why My combobox binding not working
convert timespan to datetime
call to method inside code behind file(aspx.cs file) from controller method
Casting exposes private data via getter method
How to get a proper date from a text?
Problems converting an Oracle plsql stored procedure call to C# (invalid array bind size)
How to handle null value in entity framework sum function
Audio stream requested using HttpClient doesn't play until file is completely downloaded
Complex grouping in Linq? C#.net

Categories

HOME
c#
oop
gap-system
itext7
powerquery
sequence
phpexcel
email-attachments
comma
react-select
background-image
ringcentral
spring-webflow
custom-component
descriptor
combinations
bootstrap-accordion
ithit-webdav-server
symlink
orgchart
cloudformation
libxml2
csproj
recreate
r-factor
key-bindings
postgresql-9.6
availability
openvms
powerbi-embedded
asp.net-webhooks
campaign-monitor
lighting
abide
rythm
scalamock
mediastream
julia-jump
fisheye
api-key
evaluation
dotnet-cli
jcifs
sharpssh
richtext
typewriter
programming-pearls
opticalflow
scikit-image
consolidation
konakart
sprockets
shtml
angular-i18n
jcalendar
containstable
web-performance
android-contentresolver
event-tracking
gulp-cdnizer
libgcrypt
gitk
jain-sip
uinavigationitem
cloud-storage
log-analysis
teamwork
esb-toolkit-2.1
screen-lock
skview
wingdb
jad
applinks
unityvs
novell
conditional-comments
register-allocation
drawable
traceur
flask-mongoengine
randomaccessfile
8-puzzle
pechkin
aspnet-compiler
tlbimp
azure-pack
typography
xrandr
pageload
reference-manual
vline
boost.build
doxia
django-admin-tools
django-1.4
socketasynceventargs
jqueryi-ui-buttonset
inserthtml
backlight
jquery-click-event
meego-harmattan
netbeans7.0
versions
web-search
time-management
script-tag
vista64
cross-cutting-concerns

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