Click here to Skip to main content
15,889,883 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The complete StackTrace():

Error: System.Data.OleDb.OleDbException: Object was open. at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetNewOpenConnection() at Microsoft.Practices.EnterpriseLibrary.Data.Database.GetOpenConnection(Boolean disposeInnerConnection) at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames) at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String tableName) at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteDataSet(DbCommand command) at DataAccess.Check_Web_Snapshot_Current_Exists(String original_cn)<br />


I googled for it and found nothing pertaining to 'Object was Open'. The application uses impersonation and seems to only happen when I am logged in as a user from another domain. When I am using my local account I don't see this.

However, I don't see it when I log into the computer using a local account AND at the login prompt use the other domain's credentials to log in. If that makes sense. It's hard to debug when it doesn't work locally and the only error being thrown in my logs is the one above.

Any idea's?
Thanks.
Posted

1 solution

Try closing the connection before
conn.Open()
. Seems like you are opening a new connection when there is a connection already open. Maybe helpful.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900