P
Paul Say
I have a one form application to import selected data from an Access
Database to a SQL Database.
The idea is to be able to eventually schedule the application to run in the
evenings.
The process of the application is as follows.
1) Loads a list of companies from the destination database(SQL) into a
CompanyCollection
2) Loops through each company in the collection and imports records by -
a) Loading a list of Jobs for the corresponding Company into a
DataTable then loops through each record in the
datatable
i) For each Job(Record in the datatable) , data for 6
Child tables are imported using datareaders to
read the from the source database - looping through the data reader
each record is inserted into the SQL database therough the execution of
stored procedures.
The form has a multi line textbox which sequentially records the Job No &
Description of each Job Loaded
i.e
Importing data for Company A
00-001 - Test Job 1
00-002 - Test Job 2........
Importing data for Company B
CD-345 - Test Job 1
CD-456- Test Job 2........
The Problem is as follows the application will take on adverage 13sec to
import a Job and its child records, however after the program has run for a
while aprox 20 Jobs(4 min), The application slows right down and appears to
halt, a Job can tak then anywhere from 1.5 min and up to import. I have
noticed at this point if I view the application in the windows task manager
it has a status of not responding, although it is still importing but rather
slowly.
I am wanting to know what I need to do to improve performance.
Paul Say
Database to a SQL Database.
The idea is to be able to eventually schedule the application to run in the
evenings.
The process of the application is as follows.
1) Loads a list of companies from the destination database(SQL) into a
CompanyCollection
2) Loops through each company in the collection and imports records by -
a) Loading a list of Jobs for the corresponding Company into a
DataTable then loops through each record in the
datatable
i) For each Job(Record in the datatable) , data for 6
Child tables are imported using datareaders to
read the from the source database - looping through the data reader
each record is inserted into the SQL database therough the execution of
stored procedures.
The form has a multi line textbox which sequentially records the Job No &
Description of each Job Loaded
i.e
Importing data for Company A
00-001 - Test Job 1
00-002 - Test Job 2........
Importing data for Company B
CD-345 - Test Job 1
CD-456- Test Job 2........
The Problem is as follows the application will take on adverage 13sec to
import a Job and its child records, however after the program has run for a
while aprox 20 Jobs(4 min), The application slows right down and appears to
halt, a Job can tak then anywhere from 1.5 min and up to import. I have
noticed at this point if I view the application in the windows task manager
it has a status of not responding, although it is still importing but rather
slowly.
I am wanting to know what I need to do to improve performance.
Paul Say