I am a bit confused. I am using a 3rd party COM object
that adds records to a SQL DB through OLE (that's what
they use). I can get this working perfectly in .NET.
Now, when I add the FileSystemWatcher to the code,
watching for new files. Upon a new file, read the file
and use that information with the COM object to insert
into the DB. When the FileSystemWatcher is involved,
there is some kind of error when trying to instantiate the
COM object, and completely kills the application. I have
the code within a Try Catch and still bombs without
reaching the Catch. Any ideas on this?? Feel free to ask
more specific questions if you have any!! Thanks.
Martin Platt - 22 Mar 2004 02:36 GMT
Could you tell me what you're calling, and in what order, and also from where
One immediate thought could be that you're using the wrong event on the FileSystemWatcher, that might be locking the file so the 3rd party component can't access it. The fact that the try catch doesn't work, could be down to poor error handling in that component
What event is the FileSystemWatcher using? If it's modified, I'd guess the above may be true
Look forward to hearing from you
Martin
----- Mike Fegter wrote: ----
I am a bit confused. I am using a 3rd party COM object
that adds records to a SQL DB through OLE (that's what
they use). I can get this working perfectly in .NET.
Now, when I add the FileSystemWatcher to the code,
watching for new files. Upon a new file, read the file
and use that information with the COM object to insert
into the DB. When the FileSystemWatcher is involved,
there is some kind of error when trying to instantiate the
COM object, and completely kills the application. I have
the code within a Try Catch and still bombs without
reaching the Catch. Any ideas on this?? Feel free to ask
more specific questions if you have any!! Thanks