Refreshing dataset problem?

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
 
V

Val Mazur

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top