如何实现Vb中如何获取网络中所有Sql Server服务器的名字.就象在数据库操作中那样,可以刷新,连接和测试

解决方案 »

  1.   

    http://www.china-askpro.com/msg49/qa28.shtml
      

  2.   

    'Use the SQL DMO Application Object to find the available SQL Servers
        Dim oSQLServerApp As Object, namX As Object
        Dim nIndex As Integer    Set oSQLServerApp = CreateObject("SQLDMO.Application")
        If oSQLServerApp Is Nothing Then Exit Sub    Set namX = oSQLServerApp.ListAvailableSQLServers
        For nIndex = 1 To namX.Count
            Debug.Print namX.Item(nIndex)
        Next
        Set namX = Nothing
        Set oSQLServerApp = Nothing
      

  3.   

    利用oracle存储过程和delphi7.0,要求写入10000条随机数据