📄 netmanage.dm1
字号:
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & "" ch."" & FKColumn.ChildAttribute.ColumnName
Result = Result & "" = deleted."" & FKColumn.ParentAttribute.ColumnName
If Count < Rel.FKColumnPairs.Count Then Result = Result & "" AND""
Result = Result & vbCrLf
Next FKColumn
Result = Result & "" END"" & vbCrLf
SSDefParUpdtSN = Result
End Function
Function SSDefParUpdtRstr( Rel As Relationship, TriggerName As String ) As String
Dim Result As String
Dim FKColumn As FKColumnPair
ParentCount% = 0
ChildCount% = 0
For Each FKColumn In Rel.FKColumnPairs
If FKColumn.ParentAttribute.Hidden = False Then ParentCount = ParentCount + 1
If FKColumn.ChildAttribute.Hidden = False Then ChildCount = ChildCount + 1
if ParentCount <> ChildCount Then Exit Function
Next FKColumn
Result = ""-- Parent Update: RESTRICT"" & vbCrLf & vbCrLf
Result = Result & "" IF (""
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & ""UPDATE("" & FKColumn.ParentAttribute.ColumnName & "")""
If Count < Rel.FKColumnPairs.Count Then
Result = Result & "" OR"" & vbCrLf & "" ""
Else
Result = Result & "")"" & vbCrLf & "" BEGIN"" & vbCrLf
End If
Next FKColumn
Result = Result & "" IF ((SELECT COUNT(*)"" & vbCrLf
Result = Result & "" FROM "" & Rel.ChildEntity.TableName & "" ch, deleted"" & vbCrLf
Result = Result & "" WHERE ""
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & ""ch."" & FKColumn.ChildAttribute.ColumnName
Result = Result & "" = deleted."" & FKColumn.ParentAttribute.ColumnName
If Count% < Rel.FKColumnPairs.Count Then
Result = Result & "" AND"" & vbCrLf & "" ""
Else
Result = Result & "") != 0)"" & vbCrLf
End If
Next FKColumn
Result = Result & "" BEGIN"" & vbCrLf & "" RAISERROR 30001 '"" & TriggerName
Result = Result & ""Cannot update because foreign keys still exist in ""
Result = Result & Rel.ChildEntity.TableName & ""'"" & vbCrLf
Result = Result & "" ROLLBACK TRAN"" & vbCrLf
Result = Result & "" END"" & vbCrLf
Result = Result & "" END"" & vbCrLf
SSDefParUpdtRstr = Result
End Function
Function SSDefParUpdtCasc( Rel As Relationship ) As String
Dim Result As String
Dim FKColumn As FKColumnPair
ParentCount% = 0
ChildCount% = 0
For Each FKColumn In Rel.FKColumnPairs
If FKColumn.ParentAttribute.Hidden = False Then ParentCount = ParentCount + 1
If FKColumn.ChildAttribute.Hidden = False Then ChildCount = ChildCount + 1
if ParentCount <> ChildCount Then Exit Function
Next FKColumn
Result = ""-- Parent Update: CASCADE"" & vbCrLf & vbCrLf
Result = Result & "" IF (""
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & ""UPDATE("" & FKColumn.ParentAttribute.ColumnName & "")""
If Count < Rel.FKColumnPairs.Count Then
Result = Result & "" OR"" & vbCrLf & "" ""
Else
Result = Result & "")"" & vbCrLf & "" BEGIN"" & vbCrLf
End If
Next FKColumn
Result = Result & "" SELECT ""
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
If Count% > 0 Then Result = Result & "", ""
Result = Result & ""@"" & FKColumn.ParentAttribute.ColumnName & "" = "" & FKColumn.ParentAttribute.ColumnName
Count% = Count% + 1
Next FKColumn
Result = Result & vbCrLf & "" FROM inserted"" & vbCrLf & vbCrLf
Result = Result & "" UPDATE "" & Rel.ChildEntity.TableName & vbCrLf
Result = Result & "" SET ""
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
If Count% > 0 Then Result = Result & "", ""
Result = Result & FKColumn.ChildAttribute.ColumnName & "" = @"" & FKColumn.ParentAttribute.ColumnName
Count% = Count% + 1
Next FKColumn
Result = Result & vbCrLf & "" FROM "" & Rel.ChildEntity.TableName
Result = Result & "" ch, deleted"" & vbCrLf & "" WHERE"" & vbCrLf
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & "" ch."" & FKColumn.ChildAttribute.ColumnName
Result = Result & "" = deleted."" & FKColumn.ParentAttribute.ColumnName
If Count < Rel.FKColumnPairs.Count Then Result = Result & "" AND""
Result = Result & vbCrLf
Next FKColumn
Result = Result & "" END"" & vbCrLf
SSDefParUpdtCasc = Result
End Function
Function SSDefChUpdtRstr( Rel As Relationship, TriggerName As String ) As String
Dim Result As String
Dim FKColumn As FKColumnPair
ParentCount% = 0
ChildCount% = 0
For Each FKColumn In Rel.FKColumnPairs
If FKColumn.ParentAttribute.Hidden = False Then ParentCount = ParentCount + 1
If FKColumn.ChildAttribute.Hidden = False Then ChildCount = ChildCount + 1
if ParentCount <> ChildCount Then Exit Function
Next FKColumn
Result = ""-- Child Update: RESTRICT"" & vbCrLf & vbCrLf
Result = Result & "" IF (""
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & ""UPDATE("" & FKColumn.ChildAttribute.ColumnName & "")""
If Count < Rel.FKColumnPairs.Count Then
Result = Result & "" OR"" & vbCrLf & "" ""
Else
Result = Result & "")"" & vbCrLf & "" BEGIN"" & vbCrLf
End If
Next FKColumn
If Rel.Mandatory Then
Result = Result & "" IF ((SELECT COUNT(*)"" & vbCrLf
Result = Result & "" FROM "" & Rel.ParentEntity.TableName & "" pr, inserted"" & vbCrLf
Result = Result & "" WHERE ""
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & ""pr."" & FKColumn.ParentAttribute.ColumnName
Result = Result & "" = inserted."" & FKColumn.ChildAttribute.ColumnName
If Count% < Rel.FKColumnPairs.Count Then
Result = Result & "" AND"" & vbCrLf & "" ""
Else
Result = Result & "") != @Rows)"" & vbCrLf
End If
Next FKColumn
Else
Result = Result & "" SELECT @NullRows = COUNT(*)"" & vbCrLf
Result = Result & "" FROM inserted"" & vbCrLf
Result = Result & "" WHERE ""
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & "" inserted."" & FKColumn.ChildAttribute.ColumnName & "" IS NULL""
If Count% < Rel.FKColumnPairs.Count Then
Result = Result & "" AND"" & vbCrLf & "" ""
Else
Result = Result & vbCrLf & vbCrLf
End If
Next FKColumn
Result = Result & "" SELECT @ValidRows = COUNT(*)"" & vbCrLf
Result = Result & "" FROM "" & Rel.ParentEntity.TableName & "" pr, inserted"" & vbCrLf
Result = Result & "" WHERE ""
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & ""pr."" & FKColumn.ParentAttribute.ColumnName
Result = Result & "" = inserted."" & FKColumn.ChildAttribute.ColumnName
If Count% < Rel.FKColumnPairs.Count Then
Result = Result & "" AND"" & vbCrLf & "" ""
Else
Result = Result & vbCrLf & vbCrLf
End If
Next FKColumn
Result = Result & "" IF (@NullRows + @ValidRows <> @Rows)"" & vbCrLf
End If
Result = Result & "" BEGIN"" & vbCrLf & "" RAISERROR 30001 '"" & TriggerName
Result = Result & ""Cannot update because primary key value not found in ""
Result = Result & Rel.ParentEntity.TableName & ""'"" & vbCrLf
Result = Result & "" ROLLBACK TRAN"" & vbCrLf
Result = Result & "" END"" & vbCrLf
Result = Result & "" END"" & vbCrLf
SSDefChUpdtRstr = Result
End Function
",0
StringUsage
StringUsage_Id,UniqueObject_Id,StringUsageType_Id,String_Id,Row_Time_Stamp
115,367,94,52,0
1,2,99,22,0
116,368,89,53,0
2,2,100,2,0
117,368,91,54,0
3,3,37,3,0
118,369,89,55,0
4,21,38,4,0
119,369,91,56,0
5,95,112,5,0
120,370,89,57,0
6,95,113,5,0
121,370,91,58,0
7,98,1,8,0
122,347,39,27,0
8,98,2,9,0
123,361,39,40,0
124,0,38,4,0
9,103,14,12,0
10,103,15,13,0
11,104,14,14,0
12,104,15,15,0
13,106,14,16,0
14,106,15,17,0
15,107,14,18,0
16,107,15,19,0
17,108,14,21,0
18,108,15,21,0
19,1,58,23,0
20,1,51,23,0
21,1,52,24,0
22,1,53,24,0
23,1,54,25,0
24,1,55,24,0
25,1,57,26,0
26,100,39,27,0
27,117,1,31,0
28,117,2,30,0
29,122,14,32,0
30,122,15,33,0
31,123,14,34,0
32,123,15,35,0
33,124,14,36,0
34,124,15,37,0
35,125,14,38,0
36,125,15,39,0
37,119,39,40,0
38,127,14,21,0
39,127,15,21,0
40,128,14,41,0
41,128,15,42,0
42,129,14,18,0
43,129,15,43,0
44,130,14,44,0
45,130,15,44,0
78,248,37,46,0
79,266,38,4,0
80,340,1,8,0
81,340,2,9,0
82,342,15,13,0
83,342,14,12,0
84,343,15,15,0
85,343,14,14,0
86,344,15,17,0
87,344,14,16,0
88,345,15,19,0
89,345,14,18,0
90,346,15,21,0
91,346,14,21,0
92,351,1,31,0
93,351,2,30,0
94,353,15,33,0
95,353,14,32,0
96,354,15,35,0
97,354,14,34,0
98,355,15,37,0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -