Refreshing dataset problem?

  • Thread starter Thread starter al
  • Start date Start date
A

al

Hi,

I noticed that since I have created lookup table in combobox, there
has been a performace degradation in refreshing dataset (clear and
fill)?

'code for creating lookup table in combobox

da.Fill(ds, "employees")
cboreportsto.DataSource = ds.Tables("employees")
cboreportsto.DisplayMember = "ReportsTo"
cboreportsto.ValueMember = "EmployeeID"
txtid.DataBindings.Add("text", ds, "employees.employeeid")
txtfirstname.DataBindings.Add("text", ds,
"employees.firstname")
txtlastname.DataBindings.Add("text", ds,
"employees.lastname")
cboreportsto.DataBindings.Add("text", ds,
"employees.reportsto")

'code for refreshing dataset

ds.Tables("employees").Clear()
da.Fill(ds, "employees")

MHIA,
Grawsha
 
Hi,

Fill method actually retrieves data from the database and you should expect
this issue if you call it frequently. There is no magic and your data cannot
be retrieved in no time
 
Back
Top