views:

26

answers:

1

In case of the following code:

da.Fill(ds)

Is it possible to view the return code from the Fill method in the Visual Studio debugger?

If the following is the case:

rc = da.Fill(ds)

then it's not a problem, as the variable rc gets the value assigned, but there are cases when I can't modify the code and re-build.

Thank you.

Todd

+2  A: 

It's displayed in the "Autos" window. Debug/Windows/Autos

At least for C++, doesn't seem to work for C#.

Henrik
In the Autos window (for C++), what is the name of the node that shows the return code that you mention? (I am using VB.)
Toddintr
Todd, in C++ the Autos window automatically creates a line "Fill returns". Alternatively, for C++, you could look at the EAX register. Return values are normally passed via the EAX register. Don't know if this is the same for VB, but you could try it.
Patrick
Yes, EAX use seems to be a universal convention, thank you Patrick.
Toddintr
`eax` is for x86. Use `ret0` for Itanium and `rax` for x64.
Brian Rasmussen