Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / March 2004

Tip: Looking for answers? Try searching our database.

FileSystemWatcher Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Fegter - 02 Mar 2004 20:46 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.