472,146 Members | 1,363 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

OleDbConnection keeps crashing

My C# web application connects to an Access database using the
OleDbConnection and OleDbDataReader.
I have 3 other computers that connect to this server but very frequently I
get an 'Unspecified error' message and the site becomes unusable. I have
customErrors set to 'Off' so I can see what bit of code it is crashing at
and it is always at line 78 below. (If I try and start a debug session - the
server seems to reset itself and goes back to normal so i cant tell why its
crashing there.)

----------------------------------------------------------------------------------------------------
Line 76: OleDbConnection myDataReaderConnection = new
OleDbConnection(Constants.CONNECTION_STRING);
Line 77: OleDbCommand myDataReaderCommand = new OleDbCommand(mySelectQuery,
myDataReaderConnection);
Line 78: myDataReaderCommand.Connection.Open();
Line 79: dbReader =
myDataReaderCommand.ExecuteReader(CommandBehavior. CloseConnection);
Line 80: return dbReader;
----------------------------------------------------------------------------------------------------
I think it has something to do with the APSNET user, because when I look at
'Processes' under Task Manager and kill 'Aspnet_wp.exe' - the website is
usable again and all functionality is restored to normal.

I have tried setting the session state timeout in IIS to 3 minutes in the
hope that it will kill that process but it didnt help at all.

Does anyone know how I can resolve this?

Thanks for any help,
Grant
Nov 17 '05 #1
0 1201

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by Java and Swing | last post: by
2 posts views Thread by Grant | last post: by
4 posts views Thread by Piedro | last post: by
1 post views Thread by someone | last post: by
3 posts views Thread by hbean | last post: by
1 post views Thread by =?Utf-8?B?bmljb2xh?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.