Expression cannot be evaluated at this time

  • Thread starter Thread starter Greg
  • Start date Start date
G

Greg

I have a dataset that I need to read a value from during debugging but keep
getting the error in the title of this message. I'm setting a break point
on the line: For c = 0 To dsThreads.Tables("Temp").Rows.Count - 1, but I
can't get the value. What's strange is that the table has rows in it but
when I step through with the debugger it thinks there aren't any rows (it
skips to the next section of code). This just started happening and I'm not
sure why, but it's screwing up my program.

Anyone know what causes the problem?
 
Cor Ligthert said:
Hi Greg,

How do you know the table has rows?

Cor

Hi Cor,

I know because I've added rows to it. Strangly, it works from a different
part of code within the same function. I use that code to read a different
value from the table. I've rebooted and am about to recompile to see if
that fixes it.
 
Greg said:
I know because I've added rows to it. Strangly, it works from a different
part of code within the same function. I use that code to read a different
value from the table. I've rebooted and am about to recompile to see if
that fixes it.

Actually, it's not able to read from those now either. I've stepped through
the code where it adds a new row and no errors occur. Directly after in the
same code block it attempts to read but it keeps thinking it's empty.
 
Hi Greg,

What is the count value, I put in that case always a instruction before it,
using the quick watch is for a ds to much work for me (with your datasetname
of course)

Dim i As Integer = ds.Tables(0).Rows.Count()

Cor
 
Back
Top