SQL-DMO problem

  • Thread starter Thread starter Michael C
  • Start date Start date
M

Michael C

Hi all,

Not sure if this would be better posted here or in one of the SQL groups,
but I'll try here first cause you guys are so smart :) I'm writing an app
that uses SQL-DMO to enumerate the SQL Servers on the net. Here's what the
code looks like:

private ArrayList getSqlServerList()
{
ArrayList a = new ArrayList();
SQLDMO.ApplicationClass sqlApplication = new SQLDMO.ApplicationClass();
SQLDMO.NameList ServerList = (SQLDMO.NameList)
sqlApplication.Application.ListAvailableSQLServers();
for( int Counter = 0; Counter < ServerList.Count; Counter++ )
{
string ServerName = ServerList.Item( Counter );
if( ServerName != null && a.IndexOf( ServerName ) < 0 )
a.Add( ServerName );
}
return (a);
}

It runs fine on one machine, but on another it generates the following
error: "system.invalidcaseexception : queryinterface of sqldmo failed".
From what I could find the solution is to upgrade to the "latest service
pack" on the client(?), although they don't specify which one at the time
(SP2, SP3, SP3a?) Some are saying the Service Pack might have to be
installed multiple times? I ran the code above successfully on a SQL 2000
machine with SQL 2000 SP2, but it didn't work with SQL 2000 SP3?

I couldn't find anything on in the MS KB on this issue. The program with
this code in it is going out to a lot of people out there. Does anyone know
what's going on here or how I can fix it? Can you point me to an MS KB
article or two?

Thanks,
Michael C.
 
I had the same problem quite some time ago. At that time I found some KB
that stated that SQL Server 2000 SP3 resolves the issue, and it did (when
I upgraded to sp3a)
Strangely, I cannot find that article any more.

Hope this helps,
Gorazd
 

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

Similar Threads

List SQL servers in a network 5
SQL-DMO ?? 4
SQL-DMO 4
Socket recive problem 2
SQL-DMO info 2
SQL DMO 1
service dependency on a *specific* sql server database 4
SQL-DMO Error - Please Help! 1

Back
Top