0

hi guys , i have a problem with my loading/refresh record in my form.
i have only almost 500 record and take so long before refreshing/display the data. i have a user input form where user enter their record and while saving(direct to the database) and refreshing data i just call only my function getrec ().

pls give me some idea to fix this problem.
pls take a look

Dim ActiveTable As New DataTable
Private Sub frmRef_Userlist_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        getrec
End Sub
Private Sub dtBind(ByVal dt As DataTable)
        'slow start here
        bs.DataSource = ActiveTable 'binding
        'slow end here

        bs.MoveFirst()
        bn.BindingSource = bs
        dgv1.DataSource = bs 'listview
        CloseMainCon() 'closing connection

End Sub
private sub getrec
       SqlString = "SELECT " & Tbl_Fields & " FROM " & Tbl_Name & " order by xcode desc"
        ActiveTable = OpenRSTable(SqlString)
        dtBind(ActiveTable)
end sub

`

4
Contributors
5
Replies
24
Views
3 Years
Discussion Span
Last Post by Begginnerdev
0

You can emplement some form of Data Paging to speed the process up.

For exmaple: Query in 100 records at a time then post those out to your control.

If the user starts scrolling the control, and is nearing the bottom - add another 100. Rinse and repeat!

0

can you provide any code/link. just for my reference.
also even 400 record it is normal to react that kind of slowdown?

0

even 400 record it is normal to react that kind of slowdown?

From my experience (limited) I have had 700+ records queried in take less than a second. (All codebehind using a data reader/adapter and writing my own fill functions.)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.