L
Lee Simpson
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
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