Visual Basic.NET
  Home arrow Visual Basic.NET arrow Can We Integrate Visual Basic.NET, SQL Ser...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Download TestComplete 
Windows Web Hosting
 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC.NET

Can We Integrate Visual Basic.NET, SQL Server 2000 and WMI?
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 4
    2005-11-09

    Table of Contents:
  • Can We Integrate Visual Basic.NET, SQL Server 2000 and WMI?
  • How to connect to SQL Server 2000 using WMI
  • How to retrieve “Databases” information in SQL Server instance
  • How to retrieve “tables” information in SQL Server instance

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Can We Integrate Visual Basic.NET, SQL Server 2000 and WMI?
    (Page 1 of 4 )

    This article mainly explains how to integrate WMI with SQL Server 2000, together with the Visual Basic.NET language.

    A downloadable file for this article is available here: (http://images.devshed.com/af/stories/Integrate_
    VB_SQL_WMI/example.zip
    ). 

    The sample downloadable solution (zip) is entirely developed using Visual Studio.NET 2003 Enterprise Architect on Windows Server 2003 Standard Edition together with SQL Server 2000 Enterprise Edition.  But, I am confident that it would work with other versions of Windows (which support .NET 1.1) as well.

    WMI with SQL Server 2000?

    Recently, I received a question from one of the readers about whether WMI can be used with the SQL Server 2000 database.  That question really brought me up on my toes, so I immediately started an article to achieve the same.  Not every developer would know that we can manage SQL Server 2000 using WMI. Another question you might want to ask would be “Is it really necessary to work with WMI?”  The answer would be that it is not quite necessary.  You have SQL-DMO, which is quite well matured as compared with WMI (of course it cannot even compare).  I already introduced SQL-DMO at the following link.

    http://www.aspfree.com/c/a/VB.NET/Simple-BackupRestore-
    Utility-With-SQLDMO-Using-VBNET/

    SQL-DMO is generally used only by SQL server developers and not by system administrators.  What if the system administrator wants to access SQL server database information using a common programming model?  The answer would be WMI, because WMI is specially made with them (and also with WBEM) in mind.  And I introduced WMI with Visual Basic.NET at the following link.

    http://www.aspfree.com/c/a/VB.NET/WMI-Programming-
    with-Visual-BasicNET-Breaking-the-Ice/

    As everyone knows by now, WMI is the initiative for WBEM (Web Based Enterprise Management) to fulfill Microsoft's vision.  It has nearly entered into the market of system administrators at the moment.  But, in the future, there is no doubt that it would further penetrate into the developer’s world as well. WMI is mainly used to manage tasks. The tasks may not be related to a single piece of software or component.  WMI almost works with every Microsoft product. 

    Just imagine that you have Microsoft products already designed into about 15 to 20 servers (for various scenarios) and you would like to manage several instances of all of them using a common “language.”  And WMI achieved it.  WMI can work with almost all of them (as almost all of those servers support WMI internally). 

    And another exciting point about WMI is that you can work with it using either VBScript at the command prompt (or ASP for the web) together with WSH (Windows Script Host), or you can develop very effective applications using the .NET framework. The .NET framework fully supports WMI natively (which is also good news for ASP.NET developers who develop web applications).

    As I already introduced the concept of WMI in several articles at this site, I am not going to cover any fundamentals of WMI in this article.  In this article, I mainly focus on programming WMI using Visual Basic.NET, with the target server as SQL Server 2000 (which is not well-known to many developers).

    More Visual Basic.NET Articles
    More By Jagadish Chaterjee


       · Hello guys...I opened the doors of WMI even to the level of SQL Server 2000..Have a...
       · Hi jagdesh, The article explained me more about the use of WMI calls in...
       · Hai Gupta! I am very happy that it helped you. Thanks very much, bye.
     

    VISUAL BASIC.NET ARTICLES

    - Types of Operators in Visual Basic
    - Operators
    - Understanding Custom Events using Visual Bas...
    - Polymorphism using Abstract Classes in Visua...
    - Shadowing using Shadows in Visual Basic.NET ...
    - Overloading and Overriding in Visual Basic.N...
    - More on Controlling Windows Fax Services Usi...
    - Programmatically Controlling Windows Fax Ser...
    - Focusing on Forms and Menus in Visual Basic
    - Manipulating Forms with the Windows Forms Li...
    - Basics of the Windows Forms Library
    - Forms, Controls, and Other Useful Objects
    - Implementing OOP to Develop Database Oriente...
    - Using Themes and Skins for Personalization w...
    - A Deeper Look at Personalization using Visua...

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway