I am planning a project which needs sometimes to do long process on data stored in database. I faced a problem that I cannot show a progress bar while the process is going on. I am using MS-SQL2000 stored-procedures to do my processes on the data. I want to reflect this by showing a progress bar in Delphi.
The idea comes. I have to execute the stored procedure in it's own thread. The proceudre is going to update some temporary table with the total count and the current loop index. my application should read from that temporary table and shows the progress as changes are done to it.
My problem is that I never worked with threads. and I need some help regarding them. I hope someone is going to show me how to create a thread that will execute the procedure. and my application will be able to show a progress bar reflects the loop counter stored and updated in the temporary table.