Connection To Remote Device Lost When Debugging

N

Nathan

I am no longer able to debug with VS 2003 and CF 1.0.

I can step in for a few lines, then get a message box "The connection to the
remote device has been lost". Program ends, debugging ends.

I've seen previous posts on the subject but no real solution. Yes, I have
tried rebooting, etc. I have not been able to debug for several weeks, so
this is fairly persistent.

I wonder if somewhere I am taking up too much memory and Pocket PC is
shutting down the program. If that is the case, then I definitely want to
find out what I've put in that takes up more memory to debug.

Any ideas?

Nathan
 
N

Nathan

I've narrowed it down to one line of code:

//Each row in the DataView.

foreach(DataRowView DRV in DataSource)

{


(DataSource is a DataView object).

It does fine reading six rows from the data source.

When it reaches the end of the collection, the remote connection ends and
the program ends. Only happens when debugging, and only in the last few
weeks. This part of the code hasn't changed recently.

Any ideas?

Nathan
 
N

Nathan

Whatever the reason, the problem goes away if I change it to:
//Each row in the DataView.

for(int r = 0; r<DataSource.Count; r++)

{

DataRowView DRV=DataSource[r];

I don't feel like I've found the real reason, but this does allow me to
debug. Is foreach just not safe to use with a DataView?

Nathan
 

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