Thursday, March 08, 2007 5:54 AM
Following exception is being thrown on a particular user desktop only while initiating the application.
Let me know if any one of you knows the workaround for this exception:
Message: HandlingInstanceID: c48656c1-2793-4cab-b379-e1aeaffd9340
An exception of type 'System.InvalidOperationException' occurred and was caught.
Type : System.InvalidOperationException, mscorlib, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : The ConnectionString property has not been initialized.
Source : System.Data
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void PermissionDemand()
Stack Trace : at System.Data.SqlClient.SqlConnection.PermissionDemand()
at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
Thursday, March 08, 2007 10:23 AM
It's a bit hard to go on the little details you've provided.
The PermissionDemand() in there together with the fact this only happens on one desktop suggests that there is a permissions problem somewhere.
Is the user that is getting this problem running as local admin or just a standard user? If a standard user, does an domain admin get the same problem?
Sunday, March 11, 2007 5:33 AM
Thanks for your response. I tracked down the problem myself and identified this with an issue within the registry entries being added when you create a System DSN using ODBC Data Source.
Earlier my application (client/server) used to fetch the connection string thru app.config and to make it more generic and independant of any changes being required to be made to app.config we decided to form the connection string by fetching the DSN entries being created in the local registry.
We basically decided to fetch the 'Database' and the 'Server' keys from the registry to form the string. But, when you specify windows authentication as your mode of authentication while creating the DSN it does not create a KEY - 'Database' within your registry. It creates it only when you choose SQL Server (we are using SQL Server 2005) authentication.
I didn't understood the logic behind this though?
Friday, March 16, 2007 4:29 PM
I am having the same problem but I didn't understand a word you just said. I am obviously a little new at this, but I try to figure most things out first by reading other post, hence why I am here. But this one is just over my head. the source code is as follows, thanks in advance.
PublicClass Form1 Dim theOleDbCommand As New OleDbCommand() Dim theOleDbDataAdapter As New OleDbDataAdapter(theOleDbCommand) Dim theDataSet As New DataSet()
this is just a sample app that I am working with, I will eventually use it integrated with a user input form, if at all possible. I have the other app made, it is like a time card application. Just thought I would try a sample first and can't get it. I don't know if any of that helped.
Thursday, July 28, 2011 6:50 PM
i was facing the same issue while troubleshooting someone's code. but in my case, the code was written in a way that it was entering the transaction, execute some code, commit transaction, and execute some other code without exiting the transaction.
when i moved my code inside the transaction it worked fine.
hope this helps if u r having same issue.