Expression cannot be evaluated at this time

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

    Expression cannot be evaluated at this time

    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.Table s("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

    #2
    Re: Expression cannot be evaluated at this time

    Hi Greg,

    How do you know the table has rows?

    Cor


    Comment

    • Greg

      #3
      Re: Expression cannot be evaluated at this time

      "Cor Ligthert" <notfirstname@p lanet.nl> wrote in message
      news:OeTBsgLIEH A.3840@TK2MSFTN GP11.phx.gbl...[color=blue]
      > Hi Greg,
      >
      > How do you know the table has rows?
      >
      > Cor
      >[/color]

      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.


      Comment

      • Greg

        #4
        Re: Expression cannot be evaluated at this time


        "Greg" <nospam@nospam. com> wrote in message
        news:OAHBKpLIEH A.2128@TK2MSFTN GP11.phx.gbl...[color=blue]
        > 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[/color]
        different[color=blue]
        > value from the table. I've rebooted and am about to recompile to see if
        > that fixes it.
        >[/color]

        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.


        Comment

        • Cor Ligthert

          #5
          Re: Expression cannot be evaluated at this time

          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).Ro ws.Count()

          Cor

          "Greg" <nospam@nospam. com> schreef in bericht
          news:OwCb9rLIEH A.3444@TK2MSFTN GP10.phx.gbl...[color=blue]
          >
          > "Greg" <nospam@nospam. com> wrote in message
          > news:OAHBKpLIEH A.2128@TK2MSFTN GP11.phx.gbl...[color=green]
          > > I know because I've added rows to it. Strangly, it works from a[/color][/color]
          different[color=blue][color=green]
          > > part of code within the same function. I use that code to read a[/color]
          > different[color=green]
          > > value from the table. I've rebooted and am about to recompile to see if
          > > that fixes it.
          > >[/color]
          >
          > Actually, it's not able to read from those now either. I've stepped[/color]
          through[color=blue]
          > the code where it adds a new row and no errors occur. Directly after in[/color]
          the[color=blue]
          > same code block it attempts to read but it keeps thinking it's empty.
          >
          >[/color]


          Comment

          Working...