|
-
Apr 4th, 2007, 12:30 PM
#1
Thread Starter
Frenzied Member
[2.0] List of SQL Srevers
well, i try to get the sql server list on my network
getting the names of the servers using c#
and here is what i done:
i added a refrance to use SQLDMO
here is the code i used to get the servers list
Code:
SQLDMO.Application fApp = new SQLDMO.ApplicationClass();
SQLDMO.NameList nl = (SQLDMO.NameList)fApp.ListAvailableSQLServers();
foreach (string strServer in nl)
{
MessageBox.Show(strServer);
}
this was the code and this was the Error Message that I get
Code:
Unable to cast COM object of type 'System.__ComObject' to interface
type 'SQLDMO.NameList'. This operation failed because the QueryInterface
call on the COM component for the interface with IID '{10022406-E260-11CF-
AE68-00AA004A34D5}' failed due to the following error: No such interface
supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
can ay one help me? thanks alot
Last edited by avrail; Apr 4th, 2007 at 12:33 PM.
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Apr 11th, 2007, 07:06 AM
#2
Re: [2.0] List of SQL Srevers
Please mark you thread resolved using the Thread Tools as shown
-
Apr 11th, 2007, 10:04 AM
#3
Re: [2.0] List of SQL Srevers
-
Apr 11th, 2007, 12:35 PM
#4
Thread Starter
Frenzied Member
Re: [2.0] List of SQL Srevers
well, danasegarane i really looked at this link befor you send it, and i used its code, and it gives me the same error message
thanks mendhak i will see your page
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Apr 13th, 2007, 12:12 PM
#5
Thread Starter
Frenzied Member
Re: [2.0] List of SQL Srevers
still giving me the same old error
Last edited by avrail; Apr 13th, 2007 at 12:36 PM.
You Don't Have to Rate Me.
I'm Not a Civilized Man I'm the Civilization it self
White or Black, Living or Dieing and 0 or 1 that's MY life
iam an Object in Object Oriented Life
my blog : http://refateid.blogspot.com/
twitter : @avrail
010011000111010101110110001000000100110101111001001000000101000001100011 
-
Apr 18th, 2007, 06:26 AM
#6
Re: [2.0] List of SQL Srevers
Could you try this on another machine? It might be a COM registration issue or some OS components missing. Or try uploading sample code here, we can try.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|