An unhandled exception of type 'System.Threading.ThreadAbortException' occurred in Unknown Module.

Discussion in 'ASP .Net' started by Lee Simpson, Jul 18, 2003.

  1. Lee Simpson

    Lee Simpson Guest

    Interesting problem. We have narrowed it down to the exact cause, and would
    like an explanation of what's going on behind the scenes.

    Simple bit of code:
    OleDbConnection con = new OleDbConnection(@"data source=E:\My
    Documents\Visual Studio
    Projects\ThreadErrorTest\bin\Northwind.mdb;provider=Microsoft.Jet.OLEDB.4.0"
    );
    con.Open();
    OleDbCommand cmd = new OleDbCommand("Select * from Customers", con);
    OleDbDataReader reader = cmd.ExecuteReader();
    while(reader.Read())
    Response.Write(reader[1] + "<br>");
    reader.Close();
    con.Close();


    Notice the connection string - it points to the BIN directory. This runs
    fine, but try to run it in the debugger and watch the output window. The
    thread gets torn down every request, but after the results are returned.
    Move the db to another directory, and it works fine.

    Weird
    Lee
     
    Lee Simpson, Jul 18, 2003
    #1
    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. NicK chlam via DotNetMonster.com
    Replies:
    0
    Views:
    4,936
    NicK chlam via DotNetMonster.com
    Mar 21, 2005
  2. Ankit Aneja
    Replies:
    5
    Views:
    11,777
    Steven Cheng[MSFT]
    Apr 6, 2006
  3. Replies:
    3
    Views:
    1,788
    Acken
    Oct 28, 2005
  4. JoeP
    Replies:
    1
    Views:
    1,708
  5. Warren Tang
    Replies:
    1
    Views:
    923
    Warren Tang
    Sep 23, 2008
Loading...

Share This Page