home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Internet Business Development Kit / PRODUCT_CD.iso / sqlsvr / i386 / objmdi.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-07-12  |  4.0 KB  |  128 lines

  1. VERSION 4.00
  2. Begin VB.Form ObjMDI 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Manage Objects"
  5.    ClientHeight    =   5145
  6.    ClientLeft      =   2010
  7.    ClientTop       =   2475
  8.    ClientWidth     =   8295
  9.    Height          =   5550
  10.    Left            =   1950
  11.    LinkTopic       =   "Form1"
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   5145
  14.    ScaleWidth      =   8295
  15.    Top             =   2130
  16.    Width           =   8415
  17.    Begin VB.ListBox List1 
  18.       Height          =   3150
  19.       Left            =   330
  20.       TabIndex        =   5
  21.       Top             =   540
  22.       Width           =   3315
  23.    End
  24.    Begin Threed.SSPanel Toolbar 
  25.       Align           =   1  'Align Top
  26.       Height          =   405
  27.       Left            =   0
  28.       TabIndex        =   0
  29.       Top             =   0
  30.       Width           =   8295
  31.       _version        =   65536
  32.       _extentx        =   14631
  33.       _extenty        =   714
  34.       _stockprops     =   15
  35.       Begin Threed.SSCommand Command1 
  36.          Height          =   285
  37.          Left            =   5370
  38.          TabIndex        =   4
  39.          Top             =   60
  40.          Width           =   1095
  41.          _version        =   65536
  42.          _extentx        =   1931
  43.          _extenty        =   503
  44.          _stockprops     =   78
  45.          caption         =   "&Backup"
  46.          bevelwidth      =   1
  47.          outline         =   0   'False
  48.       End
  49.       Begin Threed.SSPanel SSPanel1 
  50.          Height          =   330
  51.          Left            =   1290
  52.          TabIndex        =   2
  53.          Top             =   30
  54.          Width           =   2385
  55.          _version        =   65536
  56.          _extentx        =   4207
  57.          _extenty        =   582
  58.          _stockprops     =   15
  59.          caption         =   "SSPanel1"
  60.          bevelouter      =   1
  61.          autosize        =   3
  62.          Begin VB.ComboBox DBList 
  63.             Height          =   300
  64.             Left            =   15
  65.             Style           =   2  'Dropdown List
  66.             TabIndex        =   3
  67.             Top             =   15
  68.             Width           =   2355
  69.          End
  70.       End
  71.       Begin VB.Label Label1 
  72.          BackColor       =   &H00C0C0C0&
  73.          Caption         =   "Database:"
  74.          Height          =   195
  75.          Left            =   150
  76.          TabIndex        =   1
  77.          Top             =   90
  78.          Width           =   945
  79.       End
  80.    End
  81. Attribute VB_Name = "ObjMDI"
  82. Attribute VB_Creatable = False
  83. Attribute VB_Exposed = False
  84. Private Sub Command1_Click()
  85. Backup.Show 1
  86. End Sub
  87. Private Sub DBGrid_RowColChange()
  88. End Sub
  89. Private Sub DBList_Click()
  90. If DBList.ListIndex <> -1 Then PopulateObjectGrid (DBList.Text)
  91. End Sub
  92. Private Sub Form_Load()
  93. ' set form title
  94. MousePointer = 11
  95.   ObjMDI.Caption = "\\" + OServer.Name + "- Manage Databases"
  96.   Dim ii As Integer
  97. ' set up the grid values and column headings
  98. DBListIndex = -1
  99. Dim MyDB As SQLOLE.Database
  100. For Each MyDB In OServer.Databases
  101.         ' always check that the database is accessable
  102.         ' (database are inaccessible when being Loaded)
  103.         If MyDB.Status <> SQLOLEDBStat_Inaccessible Then
  104.             DBList.AddItem MyDB.Name
  105.             DBList.ListIndex = 0
  106.         Else
  107.             MsgBox "Database: """ + MyDB.Name + " "" is Inaccessible at this time ", 16, "Microsoft SQL Server"
  108.         End If
  109. End Sub
  110. Sub PopulateObjectGrid(MyDB As String)
  111. MousePointer = 11
  112. List1.Clear
  113. ' get the contents of device 'CurrentDevice' via .ReadBackupHeader
  114. For Each MyObject In OServer.Databases(MyDB).ListObjects
  115.     List1.AddItem MyObject.Owner + "." + MyObject.Name
  116. MousePointer = 0
  117. ' all done
  118. End Sub
  119. Private Sub Form_Resize()
  120. ' resize chart to fill MDI
  121. If WindowState <> 1 Then
  122.     List1.Left = 0
  123.     List1.Top = Toolbar.Height
  124.     List1.Width = ObjMDI.Width - 100
  125.     List1.Height = ObjMDI.Height - 400 - Toolbar.Height
  126. End If
  127. End Sub
  128.