Solved

How to kill all connections in sql server from visual basic application ???

Posted on 2004-08-26
4
291 Views
Last Modified: 2013-12-25
I tried to use SQLDMO from vb but it caused some errors is there any better solution for killing all connection sql server, I need to do it before database restore
Thanks
0
Comment
Question by:Pkrol1
  • 2
4 Comments
 
LVL 29

Expert Comment

by:leonstryker
ID: 11904659
What errors?

Leon
0
 
LVL 29

Accepted Solution

by:
leonstryker earned 500 total points
ID: 11904683
Take a look at this:

http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_21088898.html

You can create this procedure and then execute it with ADO.

Leon
0
 
LVL 15

Expert Comment

by:jdlambert1
ID: 11908337
You should run it from SQL Server, rather than SQLDMO, because it will try to kill SQLDMO's connection.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now