tag:blogger.com,1999:blog-7656888.post2660517597052720606..comments2023-10-11T04:24:22.301-06:00Comments on Aggregated Intelligence: System.InvalidOperationException: The ConnectionString property has not been initializedRaj Raohttp://www.blogger.com/profile/02773005045522319448noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-7656888.post-20583144990444610842009-06-03T08:42:32.660-06:002009-06-03T08:42:32.660-06:00I get this error. Here is my situation.
I have a...I get this error. Here is my situation.<br /><br />I have a project which contains a class. This class contains a public property called Connection. I have many sub routines that are wrapped in the "using" block.<br /><br />What happens to me is that the first routine to execute can open the connection and execute what it wants. The using block then closes the connection. My next routine fires that also is "Using me.connection" and when I reach the part where "If connection.state <> open then open" I throw this exception.<br /><br />It seems that the using block is not properly closing it, or something else is going on.<br /><br />If I declare a local variable in the sub and assign a reference to that connection property, then I do not see the exception. This is my workaround for now, but it's a maintenance issue. I want to just be able to share a connection object from the class to anything in my project that may need a door into my database.Tannerhttp://www.tannersspace.comnoreply@blogger.com