Hey Juicy,
Another way around this is to declare a public connection, maybe creating a
seperate DB class for your database connection handling. Then make sure that
all forms and classes are using your: newdbclass.connDB. The disadvantage to
this is not being able to use the visual designer to set the connection
property of dbcommands. you must do this manually in code.
Typically I do it this way to ensure there is only one instance of the
connection and the state is definate. Other benefits also include a way of
getting the connection statechange event for the entire application. This
comes in handy for statusbars. as you know that when the status changes in
this public connection there is something happening.
Regards,
Michael Proctor
"juicy" <ju***@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
I need to call oleDbConnection.open concurrently in several class or in the
same class
but there is an exception
System.InvalidOperationException occurred in system.data.dll
Additional information: The connection is already open (state=open)
************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...