Click here to Skip to main content
15,913,944 members
Home / Discussions / Database
   

Database

 
GeneralRe: Update Customise Object to Database Pin
Mazdak28-Feb-04 4:55
Mazdak28-Feb-04 4:55 
Generalget minor errors via OLEDB Pin
misha_grewal27-Feb-04 2:47
misha_grewal27-Feb-04 2:47 
GeneralRe: get minor errors via OLEDB Pin
Prakash Nadar1-Mar-04 3:12
Prakash Nadar1-Mar-04 3:12 
GeneralRe: get minor errors via OLEDB Pin
Steve S1-Mar-04 6:52
Steve S1-Mar-04 6:52 
GeneralDataSet Clear() performance problem Pin
Dan Bunea27-Feb-04 0:59
Dan Bunea27-Feb-04 0:59 
GeneralRe: DataSet Clear() performance problem Pin
Mike Dimmick27-Feb-04 9:38
Mike Dimmick27-Feb-04 9:38 
GeneralRe: DataSet Clear() performance problem Pin
Dan Bunea28-Feb-04 23:58
Dan Bunea28-Feb-04 23:58 
GeneralRe: DataSet Clear() performance problem Pin
Mike Dimmick29-Feb-04 7:20
Mike Dimmick29-Feb-04 7:20 
I see you're using a typed dataset generated by Visual Studio from an .xsd file. Using Reset on a typed data-set doesn't help, it just breaks the association between the typed DataTable-derived classes and the DataSet's Tables property. It therefore clears the data the first time, but subsequent calls to Reset do nothing. My bad.

I wonder whether retaining the complete set of data (i.e. for all companies) and using a CurrencyManager object to manage the currently displayed company would work better than clearing the dataset when fetching the next company's data?

Looking at your code again, I note that you're passing the dataset to Fill, not the dataset's typed data tables (objects derived from DataTable). If you don't have a DataTableMapping assigned to the DataAdapter, I believe the new data will be added to the DataSet as 'Table' (if you have multiple result sets returned from the query, the second result set will be returned as Table1, the third as Table2, etc). I don't know if this is happening, but it may be better to bind directly to the tables.
Me.DACompanyContacts.Fill(ds.CompanyContacts)
Me.DAGrades.Fill(ds.Grades)
Me.DAQuestionsLookup.Fill(ds.QuestionsLookup)
Me.DAEmployees.Fill(ds.Employees)
Me.DAInvoices.Fill(ds.Invoices)
Me.DATrainingCourses.Fill(ds.TrainingCourses)
Me.DATrainingNeeds.Fill(ds.TrainingNeeds)
Me.DATrainingPlans.Fill(ds.TrainingPlans)
Me.DACompany.Fill(ds.Company)
This may be worthwhile anyway because the work to go through the schema mappings is quite extensive. If it is happening, you may have a lot of stray DataTable objects hanging around.

I can't see any other problems with this code, so I'm assuming that it's a memory problem. You may want to try the CLR Profiler[^] to study the memory behaviour of your program.

Stability. What an interesting concept. -- Chris Maunder
GeneralRe: DataSet Clear() performance problem Pin
Dan Bunea29-Feb-04 20:52
Dan Bunea29-Feb-04 20:52 
GeneralReturning Large DataSet Pin
Dhrubajyoti Dey26-Feb-04 20:28
Dhrubajyoti Dey26-Feb-04 20:28 
GeneralRe: Returning Large DataSet Pin
Spanky329-Feb-04 7:24
Spanky329-Feb-04 7:24 
GeneralRe: Returning Large DataSet Pin
Rob Graham2-Mar-04 16:54
Rob Graham2-Mar-04 16:54 
GeneralMSSQL linked Server Pin
y_seval26-Feb-04 5:17
y_seval26-Feb-04 5:17 
GeneralRe: MSSQL linked Server Pin
Jeff Varszegi29-Feb-04 2:07
professionalJeff Varszegi29-Feb-04 2:07 
GeneralAccessing Excel file with ASP Pin
sschilachi26-Feb-04 4:58
sschilachi26-Feb-04 4:58 
GeneralRe: Accessing Excel file with ASP Pin
Jeff Monheiser1-Mar-04 18:55
Jeff Monheiser1-Mar-04 18:55 
GeneralRe: Accessing Excel file with ASP Pin
Rob Graham3-Mar-04 12:30
Rob Graham3-Mar-04 12:30 
GeneralE-mails, URLs e VarChars Pin
Clickok25-Feb-04 15:28
Clickok25-Feb-04 15:28 
GeneralRe: E-mails, URLs e VarChars Pin
Jon Sagara25-Feb-04 16:00
Jon Sagara25-Feb-04 16:00 
GeneralRe: E-mails, URLs e VarChars Pin
Bryan Steinberg25-Feb-04 16:07
Bryan Steinberg25-Feb-04 16:07 
GeneralRe: E-mails, URLs e VarChars Pin
Clickok26-Feb-04 5:15
Clickok26-Feb-04 5:15 
GeneralRe: E-mails, URLs e VarChars Pin
Mike Dimmick29-Feb-04 7:38
Mike Dimmick29-Feb-04 7:38 
GeneralRe: E-mails, URLs e VarChars Pin
Clickok29-Feb-04 9:07
Clickok29-Feb-04 9:07 
Question10 random recordsetsw? Pin
bryce25-Feb-04 13:54
bryce25-Feb-04 13:54 
AnswerRe: 10 random recordsetsw? Pin
Bill Dean26-Feb-04 1:47
Bill Dean26-Feb-04 1:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.