' Sub inside the activity where the type is accessed - if the line or the file does not exist, they are created on the fly
Sub MySub
Dim tempRank As String
For dayLoop=1 To 7
tempRank=dayLoop
Dim myLine As TypeI ' here is a type with the status of the scheduled line and start + end hours
myLine.Initialize
kvs.Initialize(File.DirInternal, "schedule.db")
myLine=kvs.GetEncryptedObject(tempRank,myPass)
If myLine=Null Then
FixLine(tempRank)
Exit
Else
'Do Something
End If
Next
End Sub
Sub FixLine(rank as String)
Dim myLine As TypeI ' the same type as before
myLine.Initialize
myLine.status=False
myLine.start="00:00"
myLine.end="00:00"
' kvs.Initialize(File.DirInternal, "schedule.db")
kvs.PutEncyptedObject(rank,myLine,myPass)
MySub
End Sub