MS documentViewer
This commit is contained in:
@@ -80,19 +80,30 @@ Public Class frmSQLEditor
|
||||
|
||||
Dim oConnectionGroup = LoadConnections()
|
||||
Dim oSelectedItem = Nothing
|
||||
|
||||
Dim oConnectionisZero As Boolean = False
|
||||
' Missing/Negative connection will always result in default (DD_ECM) connection
|
||||
If SQLConnection <= 0 Then
|
||||
oConnectionisZero = True
|
||||
SQLConnection = 1
|
||||
End If
|
||||
|
||||
' Select the supplied connection in the ribbon gallery
|
||||
For Each oItem As GalleryItem In oConnectionGroup.Items
|
||||
Dim oConnection = oItem.Tag
|
||||
If SQLConnection = oConnection.id Then
|
||||
oSelectedItem = oItem
|
||||
End If
|
||||
Next
|
||||
If oConnectionisZero = True Then
|
||||
For Each oItem As GalleryItem In oConnectionGroup.Items
|
||||
Dim oConnection = oItem.Tag
|
||||
If oConnection.NAME = "DD_ECM" Then
|
||||
oSelectedItem = oItem
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
For Each oItem As GalleryItem In oConnectionGroup.Items
|
||||
Dim oConnection = oItem.Tag
|
||||
If oConnection.Id = SQLConnection Then
|
||||
oSelectedItem = oItem
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
|
||||
GalleryConnection.Gallery.Groups.Add(oConnectionGroup)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user