VERSION 4.00
Begin VB.Form DInfo 
   BackColor       =   &H00C0C0C0&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Dump Device Contents"
   ClientHeight    =   3120
   ClientLeft      =   1755
   ClientTop       =   3930
   ClientWidth     =   6165
   Height          =   3525
   Left            =   1695
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3120
   ScaleWidth      =   6165
   Top             =   3585
   Width           =   6285
   Begin Threed.SSCommand Command1 
      Height          =   345
      Left            =   2160
      TabIndex        =   2
      Top             =   2610
      Width           =   1575
      _version        =   65536
      _extentx        =   2778
      _extenty        =   609
      _stockprops     =   78
      caption         =   "&Close"
      bevelwidth      =   1
      outline         =   0   'False
   End
   Begin VB.Label Label1 
      BackColor       =   &H00C0C0C0&
      Caption         =   "Dump Devices:"
      Height          =   285
      Left            =   210
      TabIndex        =   1
      Top             =   60
      Width           =   5265
   End
   Begin MSGrid.Grid DGrid 
      Height          =   2085
      Left            =   150
      TabIndex        =   0
      Top             =   420
      Width           =   5805
      _version        =   65536
      _extentx        =   10239
      _extenty        =   3678
      _stockprops     =   77
      backcolor       =   16777215
      cols            =   5
      scrollbars      =   2
      highlight       =   0   'False
      mouseicon       =   "CDInfo.frx":0000
   End
End
Attribute VB_Name = "DInfo"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
Unload DInfo

End Sub

Private Sub Form_Load()
' display the contents of a DUMP device in a grid

Dim I As Integer
Dim S As String

' set up the grid values and column headings

DGrid.Cols = 5
DGrid.Row = 0
DGrid.Col = 0
DGrid.Text = "Type"
DGrid.ColWidth(0) = 500

DGrid.Col = 1
DGrid.Text = "Database"
DGrid.ColWidth(1) = 2000

DGrid.Col = 2
DGrid.Text = "Date"
DGrid.ColWidth(2) = 1200

DGrid.Col = 3
DGrid.Text = "Time"
DGrid.ColWidth(3) = 800

DGrid.Col = 4
DGrid.Text = "Size"
DGrid.ColWidth(4) = 3000
Label1.Caption = Label1.Caption + " " + CurrentDevice

Dim MyResult As Object
DGrid.Row = 1
' get the contents of device 'CurrentDevice' via .ReadBackupHeader
Set MyResult = OServer.Devices(CurrentDevice).ReadBackupHeader
    
    For I = 1 To MyResult.Rows  ' loop through result sets
        DGrid.Col = 0
        If MyResult.GetColumnString(I, 1) = "2" Then    ' log or DB dump?
            DGrid.Text = "Log"
        Else
            DGrid.Text = "DB"
        End If
        DGrid.Col = 1
        DGrid.Text = MyResult.GetColumnString(I, 2) ' database name
        
        DGrid.Col = 2
        DGrid.Text = MyResult.GetColumnString(I, 14)    ' dated
        DGrid.Col = 3
        DGrid.Text = MyResult.GetColumnString(I, 15)    ' time
        DGrid.Col = 4
        DGrid.Text = MyResult.GetColumnString(I, 9)     ' size
                    
        If I <> MyResult.Rows Then
            DGrid.Rows = DGrid.Rows + 1
            DGrid.Row = DGrid.Row + 1
        End If
    Next I

' all done

End Sub

