Home > Language Reference > Classes > DatabaseInfo

AttrReadOnly Property

Indicates if the database is in read only access mode.

Syntax

Public Property Get AttrReadOnly() As Boolean
Public Property Let AttrReadOnly(ByVal
bReadOnly As Boolean)

ParameterDescription
bReadOnlyBoolean expression

Remarks

When the AttrReadOnly is set to True the database cannot be deleted using the Delete method or written to.

In the following example, we search for the database MyPalmDB using the FindByName method and if it is present on the handheld device, we check to see if it can be modified by verifying the value of its AttrReadOnly property.

Private Sub Button1_Click()
  dim di as new DatabaseInfo
  dim rc as new MyPalmDb
  'Search the MyPalmDb database
  If di.FindByName(app.Info.Creator & "_MyPalmDb") Then
    'Check the ReadOnly bit 
    If di.AttrReadOnly=False then
      rc.OpenTable hbModeOpenExisting+hbModeReadWrite
      rc.AddNew
      rc.Update
      rc.Close
    Else
      MsgBox di.Name & " is read only."
    End if
  End if
End Sub

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A