473,379 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Erratic debugging behavior / WriteLine won't work.

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.Writeline 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.AutoIncrementStep = -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(dsInventoryTypeOrders.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.OleDbDataAdapter

Dim daOrderDetails As New OleDb.OleDbDataAdapter

Dim test As Int16

'TestConnection()

Console.WriteLine("Test")

Debug.WriteLine("Test")

WriteLine("test")

Try

Dim sql$ = "SELECT 0 AS Selected,
VendorInventoryTypes.VendorInventoryTypesID, VendorInventoryTypes.Code,
VendorInventoryTypes.Category, VendorInventoryTypes.SubCategory,
VendorInventoryTypes.Brand, VendorInventoryTypes.Model,
VendorInventoryTypes.Description, 0 AS Quantity,
VendorInventoryTypes.RequiresUniqueItems,VendorInv entoryTypes.Cost FROM
(VendorInventoryTypes) WHERE (((VendorInventoryTypes.VendorID)=" &
lclVendorID & "));"

daOrders = mdi.dt.GenericDA(sql)

daOrderDetails = mdi.dt.GenericDA(sql)

daOrders.Fill(dsInventoryTypeOrders, "Orders") ' = mdi.dt.GenericDS(sql)

test = dsInventoryTypeOrders.Tables("Orders").Rows.Count

Dim dr As DataRow

'
Debug.WriteLine(dsInventoryTypeOrders.Tables("TBL" ).Columns.Count.ToString)'

' Debug.WriteLine(dsInventoryTypeOrders.Tables(0).Co lumns.Count.ToString)

For Each dr In dsInventoryTypeOrders.Tables(0).Rows

Debug.WriteLine(dr.Item("Selected").ToString)

Next

Dim dc As DataColumn

dc.AutoIncrement = True

dc.AutoIncrementSeed = -1

dc.AutoIncrementStep = -1

' dc.Unique = True

dc.ColumnName = "GUID"

dsInventoryTypeOrders.Tables(0).Columns.Add(dc)

view1 = New DataView(dsInventoryTypeOrders.Tables("Orders"))
Mar 15 '06 #1
0 769

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: One's Too Many | last post by:
Ran into a strange problem today: 8.1.7 on AIX 4.3.3 Database and applications had been working fine for two years and all of a sudden a couple of regularly-run queries are now no longer...
2
by: Mike | last post by:
I have a typical two frame frameset. Menu frame on the left, load content on the right frame. Lately I have been having problems in that sometimes menu links will open a new window instead of...
2
by: markusszil | last post by:
Hello all, I am working on an application which uses quite a few bitmaps as skins for custom controls. I am getting a very difficult bug to track - my application performs quite a few bitmap...
3
by: R Millman | last post by:
under ASP.NET, single stepping in debug mode appears not to stop within event procedures. i.e. 1) Create web page with submit button and event procedure for the click event in the code behind...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
6
by: Brian Bischof | last post by:
I'm having troubles getting the debugging process to work consistenly for external classes. I got it to work once and then I turned it off. But now I can't get re-enabled. Here is what I'm doing....
2
by: Rico | last post by:
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...
0
by: guyarkam | last post by:
I have the following code in which I use events to read on eth or serial port when data commes in. The ASCHFProtLib library is a third party library that I have to use as it is. Unfortunately this...
0
by: janefield2002 | last post by:
Hi there, I get the following error using Access ODBC drivers: '(unknown)' is not a valid path. make sure that the path name is spelled correctly and you are connected to the server on which...
0
by: janefield2002 | last post by:
Hi there, I get the following error using Access ODBC drivers: Microsoft OLE DB Provider for ODBC Drivers error '80004005' '(unknown)' is not a valid path. Make sure that the path name is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.