01.
02.
Dim
DA
As
New
SqlDataAdapter(
"Select * from YourTable"
, YourConnection)
03.
Dim
DT
As
New
DataTable
04.
DA.Fill(DT)
05.
If
DT.Rows.Count <> 0
Then
06.
Dim
iProgress
As
Integer
= 0
07.
Dim
iPercent
As
Integer
= 0
08.
YourProgressbar.Value = 0
09.
For
i
As
Integer
= 0
To
DT.Rows.Count - 1
10.
11.
12.
13.
14.
iProgress = iProgress + 1
15.
iPercent =
CInt
(iProgress * 100 / DT.Rows.Count)
16.
YourProgressbar.Value = iPercent
17.
lblStatus.Text =
"Loading database "
& iPercent.ToString() &
"%"
18.
Application.DoEvents()
19.
Next
20.
21.
End
If
22.