Home > Language Reference > Classes > StreamFileDB

Info Property

Returns a DatabaseInfo object.

Syntax

Public Property Get Info() As DatabaseInfo

Remarks

The Info property returns a DatabaseInfo object allowing access to the different attributes of the underlying database. You can use this property to read or modify the characteristics of a database holding an open file. If the StreamFileDB was not properly initialized by a previous call to the Open method, the return value is Nothing.

It is strongly recommended not to use the Delete, FindByName, FindFirstByTypeCreator and FindNext methods of the DatabaseInfo object returned by this property while the file is open, as this can lead the system to an unstable state.

The following example shows how to use this property to set the backup bit of a stream database:

Private Sub Button1_Click()
  Dim f as New StreamFileDB
  
  f.Open "MyFile",hbModeCreateAlways+hbModeReadWrite
  f.Info.AttrBackup=True
  
  ' Use the file  
  ...
  
  f.Close
End Sub

The following example shows how to delete a stream database after it is closed:

Private Sub Button1_Click()
  Dim f as New StreamFileDB
  Dim di as DatabaseInfo

  f.Open "MyFile",hbModeCreateAlways+hbModeReadWrite
  
  ' Use the file  
  ...
  
  Set di=f.Info ' Retrieve a DatabaseInfo object before it is closed
  f.Close       ' Close the file
  di.Delete     ' Delete the underlying database
End Sub

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A