473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

SQL-DMO problem

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.
Nov 16 '05 #1
1 2038
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
On Thu, 08 Jul 2004 22:46:50 GMT, Michael C
<mi******************************@getridofthis.com > wrote:
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.


Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: cooldv | last post by:
i am running a website on Windows 2000 server with ASP 3 webpages and Access 2000 database. (with a hosting company) traffic is slow at this time but expect to grow. lately i have been reading...
10
by: Dagwood | last post by:
Good morning: At least it's morning where I am. :) I have a rather newbie question I'm afraid. I have VisualStudio.NET, and have installed it along with SQL server. However I can't seem to...
2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
9
by: Grim Reaper | last post by:
My work let me put SQL Server 7.0 Enterprise Edition on my laptop. I have never setup a server from the beginning, so I am a little new at creating server groups. Alright, I am trying to create...
11
by: Mark Yudkin | last post by:
The documentation is unclear (at least to me) on the permissibility of accessing DB2 (8.1.5) concurrently on and from Windows 2000 / XP / 2003, with separate transactions scope, from separate...
1
by: annie | last post by:
Hi all, I have recently ported my Access 2000 app to SQL Server, keeping the Access client as the front end using linked tables. I am also using triggers on my SQL tables to trap orphan...
1
by: Peter | last post by:
I've purchased VS.NET 2005 Standard and have tried to install SQL Server 2005 Express, but get the following error in the error log. Please could someone help me.... Microsoft SQL Server 2005...
16
by: Jeremy S. | last post by:
I'm about to install VS.NET 2005 and SQL Server 2005 on a new/clean development machine (XP Pro/SP2 etc). Is the order of installation important (i.e., which product should I install first)? ...
10
by: amjad | last post by:
how to connection sql server table with aspx like pulling data from table to grid view.... simple example to start .... thanks
10
by: MVChauhan | last post by:
Hi We are planning to move over to SQL Server 2005 in near future. At the moment Website is on a seperate server then the Database. OS for both the server is Window 2003 and currently our data...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.