Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command Window problem while stepping

Status
Not open for further replies.

Becks25Not

Programmer
Jun 23, 2004
176
US
Hi All,

In my project, I have a break point set. I am trying to see the values that the current sub is working with. It is running through the code just fine, comparing, etc. But, if I type something into the command window, it gives me "Expression cannot be evaluated at this time." Any ideas?

Thanks!!
~ Becca
 
A number of things can cause this. A possible culprit is that there's a function call somewhere that doesn't return a value. This is one of the many reasons that everyone should code with Option Strict on by default :)

If you post some code we can look at it and try to reproduce it, but if it's not a real problem then I wouldn't worry about it - I believe there was also something fishy that got identified with immediate evaluation in .NET - it's supposedly fixed for 2.0.
 
Also, just in case you haven't used it yet, if you right click on pretty much anything (that's in scope) while in break mode and go to Quickwatch, it will give you all the properties of objects, the value of variables, etc.
 
Hi Dace,

Thanks for responding ...

The code is below .... interestingly enough, I declared a string and set the values I was looking for from the command window to the string and that worked (the string got set to the values) but still no luck in the command window ...

Code:
			Dim intR As Int16
			Dim rwF() As DataRow

			For intR = 0 To dv.Count - 1

				'** Find matching row in Stored
				strF = Me._TblXlsPlantLoad.PK & " = " & dv.Item(intR).Item(Me._SheetDataCols.PK)
				rwF = Me.dtTblXlsPlantLoad.Select(strF)

				'** Update Sheet Status
				If rwF.Length > 0 Then
					If CStr("" & rwF(0).Item(Me._TblXlsPlantLoad.SheetStatus)) <> CStr("" & dv.Item(intR).Item(Me._SheetDataCols.Status)) Then
						rwF(0).Item(Me._TblXlsPlantLoad.SheetStatus) = dv.Item(intR).Item(Me._SheetDataCols.Status)
						rwF(0).Item(Me._TblXlsPlantLoad.LastUpdateDate) = datUpdateDate
						rwF(0).Item(Me._TblXlsPlantLoad.LastUpdateUser) = Me._User.LogOn
						booUpdated = True
					End If
				End If
			Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top