473,320 Members | 1,936 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,320 software developers and data experts.

VB.NET tries to execute comment

It would be very long explanation, I'll try to keep it
as short as I can.

Stepping through the code I get SqlConnection error with
data adapter. Wish to see what is it.
Fine, I surround it by Try...Catch ...End Try. On the line
where da.Fill(dt) was now is "Try". Stepping through stops
on Try with the same SqlConnection error. "Try.Catch.End"
are commented out now. Stepping through the code stops
on the commented "Try" with the same error.
I have a screenshot, don't know how to post it. Would be
nice if someone from Microsoft responded, I don't want
to waste my time and open incident.

Ralfs

Nov 20 '05 #1
4 1165
Hi Ralfs

If it is any consolation, I have this happen occasionally as well. I can
usually get rid of it by rebuilding. It seems that the IDE gets out of sync
with the compiled code. Does your solution contain multiple projects? This
is the scenario when I see it in my code. Try checking the dependencies
carefully, and make sure you don't have circular references. Although VS
does let you do it I think this can upset it. [Also it's bad OO].

HTH

Charles
"Ralfs" <rp******@parks.lv> wrote in message
news:04****************************@phx.gbl...
It would be very long explanation, I'll try to keep it
as short as I can.

Stepping through the code I get SqlConnection error with
data adapter. Wish to see what is it.
Fine, I surround it by Try...Catch ...End Try. On the line
where da.Fill(dt) was now is "Try". Stepping through stops
on Try with the same SqlConnection error. "Try.Catch.End"
are commented out now. Stepping through the code stops
on the commented "Try" with the same error.
I have a screenshot, don't know how to post it. Would be
nice if someone from Microsoft responded, I don't want
to waste my time and open incident.

Ralfs

Nov 20 '05 #2
* "Ralfs" <rp******@parks.lv> scripsit:
Stepping through the code I get SqlConnection error with
data adapter. Wish to see what is it.
Fine, I surround it by Try...Catch ...End Try. On the line
where da.Fill(dt) was now is "Try". Stepping through stops
on Try with the same SqlConnection error. "Try.Catch.End"
are commented out now. Stepping through the code stops
on the commented "Try" with the same error.
I have a screenshot, don't know how to post it. Would be
nice if someone from Microsoft responded, I don't want
to waste my time and open incident.


Make a rebuild of the application. If this doesn't help, delete its
"bin" and "obj" folders and build it again.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Hi,
I see I'm not alone. Well, solution has 4 projects and
I'm checking the refs right now. Some observations when
this effect is likely to show up are:

1. Usage of COM object references
2. Variable is declared as Shared (any part of solution)
3. Office COM Add-in type of executable

I still cannot pinpoint what exactly I do but I see this
too frequently. It is somewhere in IDE, closing and
re-opening solution doesn't help, rebuild all doesn't
either. Closing the whole IDE will allow to change code and
compile correctly one time and after it IDE is stuck
on the same line in code. So far no way to get rid of it.
Just "New project/add existing item..." and until the
next bug visit.

Ralfs
-----Original Message-----
Hi Ralfs

If it is any consolation, I have this happen occasionally as well. I canusually get rid of it by rebuilding. It seems that the IDE gets out of syncwith the compiled code. Does your solution contain multiple projects? Thisis the scenario when I see it in my code. Try checking the dependenciescarefully, and make sure you don't have circular references. Although VSdoes let you do it I think this can upset it. [Also it's bad OO].
HTH

Charles
"Ralfs" <rp******@parks.lv> wrote in message
news:04****************************@phx.gbl...
It would be very long explanation, I'll try to keep it
as short as I can.

Stepping through the code I get SqlConnection error with
data adapter. Wish to see what is it.
Fine, I surround it by Try...Catch ...End Try. On the line where da.Fill(dt) was now is "Try". Stepping through stops on Try with the same SqlConnection error. "Try.Catch.End" are commented out now. Stepping through the code stops
on the commented "Try" with the same error.
I have a screenshot, don't know how to post it. Would be
nice if someone from Microsoft responded, I don't want
to waste my time and open incident.

Ralfs

.

Nov 20 '05 #4
I had this problem more often with VS2002. Haven't had it yet in 2003.

The code in the IDE is newer or different from the compiled code the
debugger is attatched to, so the execution lines don't match up. You have a
stale component or exe somewhere.

-- russ
"Ralfs" <rp******@parks.lv> wrote in message
news:04****************************@phx.gbl...
It would be very long explanation, I'll try to keep it
as short as I can.

Stepping through the code I get SqlConnection error with
data adapter. Wish to see what is it.
Fine, I surround it by Try...Catch ...End Try. On the line
where da.Fill(dt) was now is "Try". Stepping through stops
on Try with the same SqlConnection error. "Try.Catch.End"
are commented out now. Stepping through the code stops
on the commented "Try" with the same error.
I have a screenshot, don't know how to post it. Would be
nice if someone from Microsoft responded, I don't want
to waste my time and open incident.

Ralfs

Nov 20 '05 #5

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

Similar topics

3
by: JT | last post by:
I'm running Redhat 9 and just upgraded from PHP 4.2.x to 4.3.1 and no when I try to execute a script on my local server here it opens a window to try and download any .php files. I think Apache...
1
by: TheDustbustr | last post by:
<code> from __future__ import generators from time import time threads= def sleep(n): print "In Sleep" t=time() while (t+n>time()): yield None
2
by: Bram Stolk | last post by:
Hello, I am using python-2.2.2 on linux-ARM. Python itself works OK. However, importing pickle gives me *very* strange results: The first 'import pickle' fails with "ImportError: No module...
4
by: Roland Wolters | last post by:
Hi, I am reading data from a unix odbc datasource in a c# program. Reading the data as works fine, but one field, contains a date-time format that .net does not understand. The query would...
9
by: BoloBaby | last post by:
I have an extremely vexing problem occurring in a program that I am writing. Consider the following block of code: Dim pDancer As New BEDancer mintIndex = mintIndex + 1 pDancer.DancerName =...
7
by: Tom | last post by:
How can I make code not execute for a debug build, but do execute for a production build? I have code which prompts for an account and password when the program starts up. It is a pain to have to...
1
by: ewingate | last post by:
While translating some VB code to C# (both .NET 2.0) I ran across the following line of code: sResult = m_oMaintain.Execute( sCommand ); sResult and sCommand are both strings and m_oMaintain...
6
by: gyung | last post by:
Hi, this is my first post but I've been constantly referred to this site when I needed help. Anyway, this time I can't seem to find anything, so here goes. This is part of my case statement, and I...
14
by: juanpolotto | last post by:
Hi. I'm write a "passthru" application which is reading from one socket and writing to a pool of outcoming sockets. From time to time I have date duplicated in the socket and when I debug the...
3
by: oorlando | last post by:
I have wampserver installed and running >> WampServer 2.0i Includes : - Apache 2.2.11 - MySQL 5.1.36 - PHP 5.3.0 <<
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.