|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
removing a connection to a sql server database.I posted this in the sql forum but I think this place is more appropriate. I've written a vb.net windows appication that allows a user to run DTS packages on a remote SQL 2000 Server. The program runs the DTS packages in a sequence. The DTS package that fails is a simple delete database process. Drop databasename; However before I delete the database I perform the following on the database. Dim Conn As SqlConnection = New SqlConnection(ConnectionString) Conn.Open() DO some stuff Conn.Close() Conn.Dispose() Conn = Nothing I then run my executeDTSPackage code and it fails. It fails because there is a connection existing with the database. What other code do I need to add to obliterate any connection still existing? Note: the executeDTSPackage works If I don't open up a connection to the database. Thanks Chris
http://www.eggheadcafe.com/forums/ForumPost.asp?ID=46053&INTID=9
Show quote "Chris" <Ch***@discussions.microsoft.com> wrote in message
news:4AC75EDB-AC3A-46FF-BAE4-25597087BCD6@microsoft.com... > Hi, > > I posted this in the sql forum but I think this place is more appropriate. > > I've written a vb.net windows appication that allows a user to run DTS > packages on a remote SQL 2000 Server. > > The program runs the DTS packages in a sequence. > > The DTS package that fails is a simple delete database process. > Drop databasename; > > However before I delete the database I perform the following on the > database. > > Dim Conn As SqlConnection = New SqlConnection(ConnectionString) > Conn.Open() > DO some stuff > Conn.Close() > Conn.Dispose() > Conn = Nothing > > I then run my executeDTSPackage code and it fails. > It fails because there is a connection existing with the database. > > What other code do I need to add to obliterate any connection still > existing? > > Note: the executeDTSPackage works If I don't open up a connection to the > database. > > Thanks > > Chris
Other interesting topics
|
|||||||||||||||||||||||