Hello,
I have Visual Studio 2003, working on a VB.net project. When I try to step
through the code, the behavior is erratic, stepping in places where no code
exists, jumping over code sections without any goto lines or anything, and
also, when I try to use WriteLine, Console.Writeli ne or Debug.Writeline
nothing happens, nothing comes out in the command window. It's driving me
nutz!
Here is a snippet of code that was left with all my test ramblings in it.
To give you an idea of where the debugger jumps, (at one point that I can
recall off hand) it will jump from the first "Next" statement down to the
"dc.AutoIncreme ntStep = -1" line. From there it hits the next blank line,
then skips the next two lines of code to another blank line, then skips
another two lines of code landing on the "view2 = New
DataView(dsInve ntoryTypeOrders .Tables("Orders "))" line.
Any help would get GREATLY welcomed, as this is taking its tollon me!
Thanks!
Private Sub LoadData()
Dim daOrders As New OleDb.OleDbData Adapter
Dim daOrderDetails As New OleDb.OleDbData Adapter
Dim test As Int16
'TestConnection ()
Console.WriteLi ne("Test")
Debug.WriteLine ("Test")
WriteLine("test ")
Try
Dim sql$ = "SELECT 0 AS Selected,
VendorInventory Types.VendorInv entoryTypesID, VendorInventory Types.Code,
VendorInventory Types.Category, VendorInventory Types.SubCatego ry,
VendorInventory Types.Brand, VendorInventory Types.Model,
VendorInventory Types.Descripti on, 0 AS Quantity,
VendorInventory Types.RequiresU niqueItems,Vend orInventoryType s.Cost FROM
(VendorInventor yTypes) WHERE (((VendorInvent oryTypes.Vendor ID)=" &
lclVendorID & "));"
daOrders = mdi.dt.GenericD A(sql)
daOrderDetails = mdi.dt.GenericD A(sql)
daOrders.Fill(d sInventoryTypeO rders, "Orders") ' = mdi.dt.GenericD S(sql)
test = dsInventoryType Orders.Tables(" Orders").Rows.C ount
Dim dr As DataRow
'
Debug.WriteLine (dsInventoryTyp eOrders.Tables( "TBL").Columns. Count.ToString) '
' Debug.WriteLine (dsInventoryTyp eOrders.Tables( 0).Columns.Coun t.ToString)
For Each dr In dsInventoryType Orders.Tables(0 ).Rows
Debug.WriteLine (dr.Item("Selec ted").ToString )
Next
Dim dc As DataColumn
dc.AutoIncremen t = True
dc.AutoIncremen tSeed = -1
dc.AutoIncremen tStep = -1
' dc.Unique = True
dc.ColumnName = "GUID"
dsInventoryType Orders.Tables(0 ).Columns.Add(d c)
view1 = New DataView(dsInve ntoryTypeOrders .Tables("Orders "))
I have Visual Studio 2003, working on a VB.net project. When I try to step
through the code, the behavior is erratic, stepping in places where no code
exists, jumping over code sections without any goto lines or anything, and
also, when I try to use WriteLine, Console.Writeli ne or Debug.Writeline
nothing happens, nothing comes out in the command window. It's driving me
nutz!
Here is a snippet of code that was left with all my test ramblings in it.
To give you an idea of where the debugger jumps, (at one point that I can
recall off hand) it will jump from the first "Next" statement down to the
"dc.AutoIncreme ntStep = -1" line. From there it hits the next blank line,
then skips the next two lines of code to another blank line, then skips
another two lines of code landing on the "view2 = New
DataView(dsInve ntoryTypeOrders .Tables("Orders "))" line.
Any help would get GREATLY welcomed, as this is taking its tollon me!
Thanks!
Private Sub LoadData()
Dim daOrders As New OleDb.OleDbData Adapter
Dim daOrderDetails As New OleDb.OleDbData Adapter
Dim test As Int16
'TestConnection ()
Console.WriteLi ne("Test")
Debug.WriteLine ("Test")
WriteLine("test ")
Try
Dim sql$ = "SELECT 0 AS Selected,
VendorInventory Types.VendorInv entoryTypesID, VendorInventory Types.Code,
VendorInventory Types.Category, VendorInventory Types.SubCatego ry,
VendorInventory Types.Brand, VendorInventory Types.Model,
VendorInventory Types.Descripti on, 0 AS Quantity,
VendorInventory Types.RequiresU niqueItems,Vend orInventoryType s.Cost FROM
(VendorInventor yTypes) WHERE (((VendorInvent oryTypes.Vendor ID)=" &
lclVendorID & "));"
daOrders = mdi.dt.GenericD A(sql)
daOrderDetails = mdi.dt.GenericD A(sql)
daOrders.Fill(d sInventoryTypeO rders, "Orders") ' = mdi.dt.GenericD S(sql)
test = dsInventoryType Orders.Tables(" Orders").Rows.C ount
Dim dr As DataRow
'
Debug.WriteLine (dsInventoryTyp eOrders.Tables( "TBL").Columns. Count.ToString) '
' Debug.WriteLine (dsInventoryTyp eOrders.Tables( 0).Columns.Coun t.ToString)
For Each dr In dsInventoryType Orders.Tables(0 ).Rows
Debug.WriteLine (dr.Item("Selec ted").ToString )
Next
Dim dc As DataColumn
dc.AutoIncremen t = True
dc.AutoIncremen tSeed = -1
dc.AutoIncremen tStep = -1
' dc.Unique = True
dc.ColumnName = "GUID"
dsInventoryType Orders.Tables(0 ).Columns.Add(d c)
view1 = New DataView(dsInve ntoryTypeOrders .Tables("Orders "))
Comment