'DEFINE - Cursors
Dim Cursor1 As Cursor
'DISPLAY - Loading
lblStatus.Text = "Loading From DataBase..."
'INITIALIZE - DB
SQL1.Initialize(File.DirDefaultExternal, Mac&".db", True)
'QUERY - Total
Total = SQL1.ExecQuerySingleResult("SELECT count(id) FROM table")
'QUERY - Query
Cursor1 = SQL1.ExecQuery("SELECT id, name, desc, year FROM table ORDER BY id DESC")
'ADD - Items
For i=0 To Cursor1.RowCount-1
'INCREMENT - Cursor1
Cursor1.Position = i
'DISPLAY - Loading
lblStatus.Text = "Loading From DataBase..."&Round((I)*100/Total)&"%"
'UPDATE - ProgressBars
prgStatus.Progress = Round((I)*100/Total)
'DOEVENTS - Main
DoEvents
Next
'DISPLAY - Loading OK
lblStatus.Text = "Loading From DataBase...OK"