MS Data Access Block

S

Schoo

OK... this is very strange.

I have an ASP.NET app (VB backend) that uses MS Data Application Blocks. I
had it all working a month ago and am now bringing it out to add some
features and it was crashing. I narrowed the problem down to line 460 in
the SQLHelper.vb class of the MS Data Application Block which reads:

If Not connection is nothing then connection.dispose()

I am stepping through the code and it is actually having a problem running
connection.dispose(). Here is the strange part: "Not connection is
nothing" is returning "False" (verified with the command window). My
question: why is it running the "connection.dispose()" if the 'test'
condition is returning "False"?

Schoo
 
S

Schoo

I found some additional information that may be helpful:

I am discovering that another application that I developed using this same
data application block are having the same problem. This is all in the
development environment on my workstation.

I have done many rebuilds and computer reboots.

Schoo
 
S

Steven Cheng[MSFT]

Hi Schoo,

From your description, you're using the Data Access Application Block for
.net in your web application and currently you found that the Application
Block will run into problem which cause your applcaiton crash?

As you mentioned that the code worked well previously and run into problem
when you bringing it out to add some
features, do you mean that you've done some change to the block's code?

Also, you said that there're other application which use this block run
into the same problem on the same machine? Then, have you tried isolate the
Application Block's code out and try running them on some other machine to
see whether the same problem occur? And what we can check now is :
1. If the problem occurs currrently on the same machine which doesn't exist
previously. We can check is there anything been update on the machine?
such as framework, or the block's version?

2. If the problem only exist on the particular machine other than other
machines, you can compare it to other mahcines to see whether there are
anything different between them.

If you have any new findings, please also feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
S

Schoo

Steven,

Thank you for your response. I will answer your questions:

I have not changed the block's code! When I said that I changed some
features, I meant in my program that uses the block, not that I made changes
to the block.

I will have to take-back what I said about other programs having a problem
with the block. I checked again and now things seem to run fine in other
applications. So, the only problem seems to be in the one application I am
working with here.

Even though I only have the block referenced and not included as a project
in my solution, when the error happens VS.NET allows me to open the
SQLHelper.vb interface to show me where the error happens. This is the most
confusing part: as I stated in my previous email, the error happens on line
460:
If Not connection is nothing then connection.dispose()

I am stepping through the code and it is actually having a problem running
connection.dispose(). Here is the strange part: "Not connection is
nothing" is returning "False" (verified with the command window). My
question: why is it running the "connection.dispose()" if the 'test'
condition is returning "False"?

This is very strange. I had this type of thing happen in the past, but the
cause was that there was a code-behind that had the same class in it as
another code-behind. I don't think that is the case here. I don't know if
this is related, but there are 5 lines in my task list that I do not know
how to clear. Maybe these have something to do with the problem or will
give you a clue. Here they are:

1) Could not copy temporary files to the output directory
2) The file 'busForms.dll' cannot be copied to the run directory. The
process cannot access the file because it is being used by another process.
3) The file 'busForms.pdb' cannot be copied to the run directory. The
process cannot access the file because it is being used by another process.
4) Warning: The dependency 'busForms, Version=1.0....., Culture=neutral'
in project 'Forms1' cannot be copied to the run directory because it would
overwrite the reference 'busForms, Version= 1.0...., Culture=neutral'.
5) Warning: The dependency 'Settings, Version=1.0....., Culture=neutral'
in project 'Forms1' cannot be copied to the run directory because it would
overwrite the reference 'busForms, Version= 1.0...., Culture=neutral'.

Please consider the line the code is stopping on and the error messages. I
hope this information leads us to a fix. Please let me know what you think.

Thanks,

Schoo
 
K

Kevin Yu [MSFT]

Hi Schoo,

Based on my experience, when "Not connection is nothing" returns false, the
code block after the condition will not be executed. Or there might be some
issue with the VB.NET compiler.

Could you please try to re-install that Data Access Block and reference
that assembly in your project again?

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top