MS Data Access Block

Discussion in 'ASP .Net Web Controls' started by Schoo, Jul 9, 2004.

  1. Schoo

    Schoo Guest

    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
     
    Schoo, Jul 9, 2004
    #1
    1. Advertising

  2. Schoo

    Schoo Guest

    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

    "Schoo" <-hc.com> wrote in message
    news:eEf2q$...
    > 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
    >
    >
     
    Schoo, Jul 9, 2004
    #2
    1. Advertising

  3. 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
     
    Steven Cheng[MSFT], Jul 10, 2004
    #3
  4. Schoo

    Schoo Guest

    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

    "Steven Cheng[MSFT]" <> wrote in message
    news:...
    > 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
    >
     
    Schoo, Jul 15, 2004
    #4
  5. 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."
     
    Kevin Yu [MSFT], Jul 16, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Showjumper
    Replies:
    1
    Views:
    711
    Showjumper
    Mar 19, 2005
  2. Fernando Lopes
    Replies:
    0
    Views:
    868
    Fernando Lopes
    Mar 29, 2005
  3. Noozer

    Block DIV within a block DIV?

    Noozer, Jan 6, 2005, in forum: HTML
    Replies:
    3
    Views:
    11,394
    Mitja
    Jan 6, 2005
  4. morrell
    Replies:
    1
    Views:
    977
    roy axenov
    Oct 10, 2006
  5. Torben Laursen

    Block access to zip files using access rules

    Torben Laursen, May 12, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    436
    bruce barker
    May 12, 2008
Loading...

Share This Page