Home  |  Index  |  Dotnet4all Snippets  |  Submit resources
About  |  Mail us  
Dotnet4all Logo

  Expression cannot be evaluated at this time (Thursday, September 02, 2004)




Found the following interesting discussion in the Newsgroups:

Expression cannot be evaluated at this time
by: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?


 Reply:
by:Cor Ligthert

 Hi Greg,

How do you know the table has rows?

Cor


 Reply:
by:Greg

 
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.


 Reply:
by:Greg

 
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.


 Reply:
by:Cor Ligthert

 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








 
Previous Posts
    - How to Prevent Mouse Movement and Clicks From Reac...
    - Create a dll
    - Attaching debugger in a macro
    - How to show form after Splash Screen closes
    - Using DAO in .Net
    - 'Class not registered' When application is install...
    - Redirect Method
    - Textbox truncate
    - Help in Treeview
    - Microsoft Visual C++ .NET Step by Step

Archives
    - 08/01/2004 - 08/08/2004
    - 08/08/2004 - 08/15/2004
    - 08/15/2004 - 08/22/2004
    - 08/22/2004 - 08/29/2004
    - 08/29/2004 - 09/05/2004
    - 09/05/2004 - 09/12/2004
    - 09/12/2004 - 09/19/2004
    - 09/19/2004 - 09/26/2004
    - 09/26/2004 - 10/03/2004
    - 10/03/2004 - 10/10/2004
    - 01/02/2005 - 01/09/2005
    - 01/09/2005 - 01/16/2005
    - 01/30/2005 - 02/06/2005
    - 01/01/2006 - 01/08/2006


Disclaimer & Terms of Use  | DotNet4All.Com concept & © 2004 - 2007 by  Zelders²  - Holland