Results 1 to 6 of 6

Thread: [2.0] List of SQL Srevers

  1. #1

    Thread Starter
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    Smile [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

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: [2.0] List of SQL Srevers

    Please mark you thread resolved using the Thread Tools as shown

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2.0] List of SQL Srevers

    I tried a search on that error message, I got this

    http://stevenharman.net/blog/archive...O_install.aspx

  4. #4

    Thread Starter
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    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

  5. #5

    Thread Starter
    Frenzied Member avrail's Avatar
    Join Date
    Mar 2006
    Location
    Egypt, Cairo
    Posts
    1,221

    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

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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
  •  



Click Here to Expand Forum to Full Width