Sub Process_Globals
Dim SQL1 As SQL
End Sub
Sub Globals
Dim TableLog As Table
End Sub
Sub Activity_Create(FirstTime As Boolean
If FirstTime Then
SQL1.Initialize("Removable/MicroSD/Aviation/", "AvData.sqb", False)
End If
TableLog.Initialize(Me, "Table1", 14)
TableLog.AddToActivity(Activity, 0, 0dip, 100%x, 50%y)
TableLog.SetHeader(Array As String("_id", "Serial", "Maker", "Type", "SubType", "Name", "Msn", "Check", "OpCode", "Operator", "Location", "Date", "Notes", "Extra"))
TableLog.SetColumnsWidths(Array As Int(100dip, 100dip, 100dip, 100dip, 100dip, 100dip, 100dip, 20dip, 40dip,150dip,50dip,80dip,100dip,100dip))
Dim Cursor1 As Cursor
Cursor1 = SQL1.ExecQuery("SELECT * FROM Log WHERE Type LIKE 'A320' ORDER BY _id")
For x = 0 To Cursor1.RowCount - 1
Cursor1.Position = x
Dim TableMap(14) As String
For i = 0 To Cursor1.ColumnCount-1
TableMap(i)=Cursor1.GetString2(i)
Next
TableLog.AddRow(TableMap)
Next
Activity.Title = x & " records found."
Cursor1.Close
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub TableLog_CellClick (Col As Int, Row As Int)
Log("CellClick: " & Col & " , " & Row)
Activity.Title = TableLog.GetValue(Col, Row)
End Sub
Sub TableLog_HeaderClick (Col As Int)
Log("HeaderClick: " & Col)
End Sub