Error "Unknown error" on OleDbConnection
Uwe Keim
Posts: 48 Bronze 3
When running my WinForms , 32 bit.NET 4.5.2 application inside ANTS Performance Profiler 10.1.7, as soon as an OleDB connection to a Microsoft Access MDB is being opened, an OleDbException error is being rised:
I'm using German 64 bit Windows 10 with latest updates and 1903 update.
My question:
How can I use your profiler even when having OleDB operations in my application.
(Note that this did work approx. until half a year ago correctly).
When running normally without your profiler on in another profiler (like that from JetBrains), no OleDbException occurs.
System.Data.OleDb.OleDbException-----------------"Unknown error"-----------------at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)bei System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)bei System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)bei System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)bei System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)at System.Data.OleDb.OleDbConnection.Open()
I'm using German 64 bit Windows 10 with latest updates and 1903 update.
My question:
How can I use your profiler even when having OleDB operations in my application.
(Note that this did work approx. until half a year ago correctly).
Tagged:
Best Answer
-
Uwe Keim Posts: 48 Bronze 3Damn it, I also cannot reproduce it anymore .
Yesterday I updated to latest VS 2019 (16.2.1), maybe there was an issue in a previous compiler version that produced "strange" code and thus lead to the error?
Anyway, I hope it stays working now, if not, I'll post here again. Thanks for your help, Jessica!
Answers
I'm able to reproduce it and it seems the profiler is affecting the login somehow. (The underlying error is System.Data.SqlClient.SqlException: Cannot open database "x" requested by the login. The login failed.)
I am looking into this and will post here once I have an update.
Thanks for bringing it to our attention!
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
I'm so sorry, I've realized I'm not actually able to reproduce this (I had just made a mistake on my end which was causing a different issue!).
Can I just check, does the error remain if you use Sampling mode of profiling?
And do you see any additional error details in Event Viewer>Windows log>Application?
What .NET Framework(s) do you have turned on/installed?
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
Event log has this:
And this:
Don't know if this is related, but still you product seems to be very unstable to me, compared to other tools like dotTrace.
Still, ANTS Performance Profiler has the very best UI among all similar tools, so I would love to have a stable version one day.
Does the crash happen consistently?
As the error happens in the profiler core which is unmanaged, the error report unfortunately doesn't have much detail for us.
Would it be possible for you to share a dump file with us to take a deeper look into what's going wrong? (I can send you the details on how to do this if so.)
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
The error only happens every now and then.
Thank you, @Uwe Keim!
The next time the crash occurs, please:
Since the .dmp file may be quite large, I'll make a link for you to upload to and will send it shortly via the ticket we've opened for you (#143604).
If you can also let us know about the profiling mode used, the options set, and the action leading up to the crash, it would be much appreciated!
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?