I'm having problems using breakpoints with Visual Basic .Net. Breakpoints
work until I excute certain commands. If I set a breakpoint above the
odtrVBDataReade r = .ExecuteReader( )
statement in the example below it works fine. Any breakpoint after the
statement won't be hit. The code executes as expected, it just won't stop at
the breakpoints. Also if I single-step to the command above, when it is
executed I get the "There is no source code available for the current
location." pop-up. The code below shows an example:
Public Sub Testsub()
Dim Test As String
Dim strVBConn As String = _
"Provider=Micro soft.Jet.OLEDB. 4.0;" _
& "User ID=Admin;" _
& "Data Source=""(path) \File"""
Dim ocmdVBCommand As OleDbCommand
Dim odtrVBDataReade r As OleDbDataReader
Try
ocmdVBCommand = New OleDbCommand
With ocmdVBCommand
.Connection = New OleDbConnection (strVBConn)
.Connection.Ope n()
.CommandText = "Select Account, PaidBy From Table"
-> odtrVBDataReade r = .ExecuteReader( ) ' Break points above
this work.
End With
Do While odtrVBDataReade r.Read
Test = odtrVBDataReade r.GetString(1)
Loop
Catch oexpData As OleDb.OleDbExce ption
Exit Sub
End Try
odtrVBDataReade r.Close()
ocmdVBCommand.C onnection.Close ()
End Sub
Any help would be appreciated.
Thanks,
Rick 1 1236
I have worked around this problem. The statements below do cause the
problem, it's just where it shows up. I eliminated statements until I found
the problem. It was caused by the following statement:
intCharCountE = InStr(intCharCo untS, strtest, "~", CompareMethod.T ext)
When I removed the CompareMethod.T ext option of the statement, the problem
went away.
Rick
"Rick D" wrote: I'm having problems using breakpoints with Visual Basic .Net. Breakpoints work until I excute certain commands. If I set a breakpoint above the odtrVBDataReade r = .ExecuteReader( ) statement in the example below it works fine. Any breakpoint after the statement won't be hit. The code executes as expected, it just won't stop at the breakpoints. Also if I single-step to the command above, when it is executed I get the "There is no source code available for the current location." pop-up. The code below shows an example:
Public Sub Testsub() Dim Test As String Dim strVBConn As String = _ "Provider=Micro soft.Jet.OLEDB. 4.0;" _ & "User ID=Admin;" _ & "Data Source=""(path) \File""" Dim ocmdVBCommand As OleDbCommand Dim odtrVBDataReade r As OleDbDataReader Try ocmdVBCommand = New OleDbCommand With ocmdVBCommand .Connection = New OleDbConnection (strVBConn) .Connection.Ope n() .CommandText = "Select Account, PaidBy From Table" -> odtrVBDataReade r = .ExecuteReader( ) ' Break points above this work. End With Do While odtrVBDataReade r.Read Test = odtrVBDataReade r.GetString(1) Loop
Catch oexpData As OleDb.OleDbExce ption
Exit Sub End Try odtrVBDataReade r.Close() ocmdVBCommand.C onnection.Close () End Sub
Any help would be appreciated. Thanks, Rick This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Charles Law |
last post by:
I have started getting "There is no source code available for the current
location" when I run my VB.NET solution.
I have no breakpoints set but cannot get rid of this message. The debugger
won't let me continue. Does anyone know what is going on?
I seem to think that this only started happening after I used the "Disable
all breakpoints"...
|
by: Marco |
last post by:
I am trying to debug a C++ program using Visual C++ 6.0. After setting
my breakpoints and starting the debug with F5, I get the error message
"One or more breakpoints cannot be set and have been disabled.
Execution will stop at the beginning of the program."
even though it used to work before. Is there some setting I need to
change,...
|
by: fred |
last post by:
What has happened to my breakpoints?
Whenever I start my application from the IDE in Visual Studio then all of
the breakpoints show a "?" and a comment says "The breakpoint will not
currently be hit. No symbols have been loaded for this document."
Needless to say the program does not stop at the breakpoints anymore.
What have I done to...
|
by: Rick D |
last post by:
I'm having problems using breakpoints with Visual Basic .Net. Breakpoints
work until I excute certain commands. If I set a breakpoint above the
odtrVBDataReader = .ExecuteReader()
statement in the example below it works fine. Any breakpoint after the
statement won't be hit. The code executes as expected, it just won't stop at
the...
|
by: Sheshadrinath R |
last post by:
Hello,
I have a project, which is written in VB.NET. When, I am trying to debug,
I am able to debug in only some forms. In the remaining forms, eventhough, I
have put the breakpoints, I am unable to get the control at that breakpoints.
Without this breakpoints, I am unable to proceed, as I need to fix some bugs
here.
So, please let me know...
| |
by: wASP |
last post by:
Hi,
I'm posting this again - I'm having some kind of a problem
with my posts disappearing ...
I'm having a problem with establishing breakpoints in DbgCLR Version 2.0.
I've set breakpoints for statements in Page_Init, and they were never triggered
|
by: MSK |
last post by:
Hi,
Continued to my earlier post regaring "Breakpoints are not getting hit"
, I have comeup with more input this time.. Kindly give me some idea.
I am a newbie to .NET, recently I installed .NET. I could not debug
using breakpoints,
breakpoints are not getting hit, but the application is working fine
with out any issue.
|
by: jeem |
last post by:
I am using ActiveState Komodo 3.5 to work on a large python 2.4
application with an extensive UI... I am attempting to debug the
application and am setting breakpoints in 4 different *.py files..
Breakpoints in the main file are working OK, but any breakpoints in
imported files are not... The three imported files are open in Komodo
and are...
|
by: Jeff |
last post by:
Hey
How can I get a list of breakpoints in Visual Studio 2005, while the loaded
solution is in Edit mode (not running or not debugging)...
I'm trying to learn thousands of uncommented C# code and if I had some kind
of bookmarks (breakpoints) I then could more easly scroll to those specific
lines, instead of scrolling thousands of lines...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |