Step into code for application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've got an ADO.NET application which I would like to debug by inserting a
breakpoint in a statement of the code. When I pressed F11 to start debugging,
VS.NET always displayed a JScript. I had to step through every statement in
it until the webpage showed up.

Actually, I wanted to see the output of every statement in the output
window. Is there anything wrong with my code ?

I created a data relation between two tables and upon selecting a value from
the dropdownlist, the datagrid should display the related child tables. I'm
still unable to achieve that.
 
Hello Kim,

To what i've understood is that you should just place a BreakPoint only on
the Procedure/Function or any line from you wish you start debug, this way
when you'll press F5 to execute ur program, you will only Step-IN when the
line where you've placed a breakpoint is reached.

But suppose you started your application in debug mode (where there's line
by line debugging from the beginning) so there you can "Step-Out" of the code
by pressing "CTRL+SHIFT+F8" or go to the "Debug Menu -> STEP OUT"

Now for your Data relations, just query the "SelectedText" property ( i
think ) of the combo box, and

Dim ds As New DataSet
Dim msql As String = "select* from authors"
Dim DA As New SqlDataAdapter(msql, mCn)
DA.Fill(ds)
DG_Authors.DataSource = ds.Tables(0)


Hope this'll help you, do let me know

All the best
 
Hi, Sincere

I could not find any "Step out" function under the Debug menu and the
CTRL+SHIFT+F8 key does not enter into debug at all.

My code is as follows:
_________________________________________
Private Sub ddlCustomer_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Dim drNew As New DataRelation("CustOrders",
ds.Tables("Customers").Columns("CustomerID"),
ds.Tables("Orders").Columns("CustomerID"))
Dim dvCust As New DataView(ds.Tables("Customers"))

ds.Relations.Add(drNew)
dvCust.Sort = "CustomerID, ASC"
Dim idx As Integer = dvCust.Find(lstCustomer.SelectedItem.Value)
Dim drvCust As DataRowView = dvCust(idx)
Dim dvOrders As DataView = drvCust.CreateChildView(drNew)

dgOrders.DataSource = dvOrders
dgOrders.DataBind()

End Sub
________________________________________________

When the form postback, the dataset "ds" is saved in a session object and is
retrieved when it returns from the server. This code was added in the
Page_Load event handler.
 
Back
Top