I want to use a progressbar to show that I'm retrieving the records from the database so that the user wont be confuse if the program is still running or not. Here's my code. Please help me..
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
cs = "Initial Catalog = KRADB; Data Source = .; User id = lab; Password = 'clrscr2010'"
sqlcon = New SqlConnection(cs)
sqlcon.Open()
sqlcon.Close()
dt = New DataTable
sda = New SqlDataAdapter("SELECT * FROM KRAWEEK WHERE STATUS='INITIAL'", sqlcon)
sda.Fill(dt)
If dt.Rows.Count <> 0 Then
dg.DataSource = dt
End If