SQL-DMO ListAvailableServers method from vbscript 
Author Message
 SQL-DMO ListAvailableServers method from vbscript

I have been trying to use the SQL-DMO ListAvailableServers
method from VBScript.

The following seems to work alright:

   Set oApp = CreateObject("SQLDMO.Application")

   Set oNames = oApp.ListAvailableSQLServers()

But
    For Each oName In oNames

        srvlist =srvlist & Chr(9) & oName

    Next

causes an error as the For is entered:

Microsoft SQL-DMO: [SQL-DMO]Code execution exception:  
EXCEPTION_ACCESS_VIOLATION

I would be grateful for advice / examples from anyone who
has used this method successfully in vbscript under WSH
AND output the results.

Cheers

Charles



Mon, 26 Apr 2004 16:40:41 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. SQL-DMO ListAvailableServers Method

2. Using Vbscript and SQL-DMO to connect to SQL Server and run a T-SQL script

3. SQL-DMO issue with Shrink Method

4. SQL-DMO ImportData method

5. SQL-DMO Shrink Issue

6. SQL.DMO LOGFILE SHRINK Issue

7. SQL-DMO issue....trying to autmate log file shrink

8. SQL DMO (creating SQL Jobs/steps)

9. Using SQL-DMO to restore SQL databases

10. connect to sql server through sql-dmo

11. SQL DMO in VB-NET

12. SQL-DMO

 

 
Powered by phpBB® Forum Software