Weird error when marshalling objects using remoting

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tim Shih

    #1

    Weird error when marshalling objects using remoting

    Hi,

    I am encountering a really subtle error which I have been trying to isolate
    for a while and I am still not able to find it. The problem boils down to
    this: I have a button which marshals two files (two images) across a
    remoting boundary. It does this by accessing an Access database for the
    filenames. If the two files actually exist, my program runs fine. However,
    if I remove or rename the files (so that the filename listed in the access
    database is no longer valid) than it runs fine after about 25 tries, then
    gives the following error:

    at System.Data.Ole Db.OleDbConnect ion.ProcessResu lts(Int32 hr)
    at System.Data.Ole Db.OleDbConnect ion.InitializeP rovider()
    at System.Data.Ole Db.OleDbConnect ion.Open()
    Message: Unspecified error

    This seems to be some sort of memory leak. I have made sure to close all of
    my connections and readers when they are done. In addition, I am checking to
    see if the filename exists before doing anything (using
    System.IO.File. Exists). However, this ONLY occurs, if the two files being
    sent are renamed or deleted. Otherwise, the program runs indefinitely with
    no problems. The check simply creates a blank object instead of sending the
    actual image files (which is caught on the other end). This is probably one
    of those "symptoms don't point anywhere near the actual problem" problems
    but I can't seem to figure out why it should make a difference. Any help
    would be greatly appreciated!!

    -Tim






  • Tian Min Huang

    #2
    RE: Weird error when marshalling objects using remoting

    Hi Tim,

    According to the call stack of the error, it seems to me that the error
    occurs when it trying to open the Access database. I recommend you check
    whether the Access connections are close properly when there are some
    errors/exceptions occur (say, fail to access the images files).

    I look forward to hearing from you.

    Have a nice day!

    Regards,

    HuangTM
    Microsoft Online Partner Support
    MCSE/MCSD

    Get Secure! ¨C www.microsoft.com/security
    This posting is provided ¡°as is¡± with no warranties and confers no rights.


    Comment

    Working...