Weird error when marshalling objects using remoting

T

Tim Shih

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.OleDb.OleDbConnection.ProcessResults(Int32 hr)
at System.Data.OleDb.OleDbConnection.InitializeProvider()
at System.Data.OleDb.OleDbConnection.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
 
T

Tian Min Huang

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.
 

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