Multithreading

M

MSNEWS

Hi

I have developed a vb.net application which converts word documents in a
directory to text files and then loads the text into a SQL SERVER database.
(I have around 8 million documents to convert). I'm using the
word.applicationclass interop to convert to a text file.

The application is working reasonably well, but occasionally Word will ask
for a password, give an error message about a corrupt file etc, and my
application freezes until somebody closes the word dialog box.

I've tried to code around most of the issues but there are some I cannot
code around.

SO, I was wondering if I could handle this better by multi-threading my
application, I'm thinking something like this :-

.. MAIN THREAD : Scans directory for word documents, when word document
found a new thread "WORD THREAD" is created
.. WORD THREAD: Use the word interop to convert the word document to a text
file
.. MAIN THREAD: Pools "WORD THREAD" waiting for it to complete, if it
doesn't complete within (say a minute) then "WORD THREAD" is killed, and
then move onto the next file


Does this sound feasible? If so I've no idea where to start, any hints on
multithreading in vb.net?

Thanks
 
G

Guest

By using Delegates, you can streamline your worker thread to your UI efficiently.

this "dialog box" that just seems to pop up... Can't you collect that it's requesting that, and override the behavior? I really don't know because I haven't worked with the office10.dll yet.
 

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