D
davepkz
Hi,
I have a C# Windows app that uses ADO.NET.
I place an Access db on a network drive and connect to it with my app.
Then I pull the network cable.
Under some conditions (I haven't been able to isolate the pattern), I
can continue to make database requests (e.g. "SELECT COUNT(*) OF
EMPLOYEE" returns 285)... and get no errors!
Why? Shouldn't it throw an exception saying "Drive or Network not
found" ??
Has it cached the whole database? (I would rather it not).
THEN...
I reconnect the network cable. And I wait a good 30 seconds to be
sure all connections are active.
Under some conditions (still can't find the pattern), I do get the
exception I was expecting before: Network Error Native ErrorCode =
-66913278.
Why would I get any error when connection is back and active? If I
Close() and Open() the OleDbConnection object, all is happy again.
I'm just not clear why that should be necessary (It wasn't back in the
ODBC days...)
Does anyone understand why ADO.NET behaves this way?
Thanks
Dave
I have a C# Windows app that uses ADO.NET.
I place an Access db on a network drive and connect to it with my app.
Then I pull the network cable.
Under some conditions (I haven't been able to isolate the pattern), I
can continue to make database requests (e.g. "SELECT COUNT(*) OF
EMPLOYEE" returns 285)... and get no errors!
Why? Shouldn't it throw an exception saying "Drive or Network not
found" ??
Has it cached the whole database? (I would rather it not).
THEN...
I reconnect the network cable. And I wait a good 30 seconds to be
sure all connections are active.
Under some conditions (still can't find the pattern), I do get the
exception I was expecting before: Network Error Native ErrorCode =
-66913278.
Why would I get any error when connection is back and active? If I
Close() and Open() the OleDbConnection object, all is happy again.
I'm just not clear why that should be necessary (It wasn't back in the
ODBC days...)
Does anyone understand why ADO.NET behaves this way?
Thanks
Dave