removing a connection to a sql server database.

G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top