Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    12

    Unanswered: ListAvailableSQLServers

    I have a VB6 app that uses ListAvailableSQLServers to collect the server names on a computer. On Windows XP, however, the default instance shows up as (LOCAL) while @@servername is the computername. When my app tries to select from (LOCAL).db.dbo.table, it gets "SQL Server does not exist or access is denied." If it selects from "computer".db.dbo.table all is well.

    Any thoughts how to get around this? Aliasing does not work...

    Thanks in advance.

  2. #2
    Join Date
    Feb 2004
    Location
    PAKISTAN
    Posts
    106
    Plz first make sure the SQL service is running by checking it under the Services group in the Management console and what startup service account it's using; can u connect to that instance thru Query Analyzer? If yes then type in
    select serverproperty('servername').
    Check the mode of Authentication u r tryin to connect to SQL thru. Post some details about the startup-service account etc.

    Howdy.

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Since the (local) server is nearly "hardwired" into the list, there isn't a good way to avoid it. The machine name should still appear in the list anyway. I usually just put in code to ignore both the IP address and the constant (local) as I iterate through the list of servers.

    -PatP

  4. #4
    Join Date
    Mar 2004
    Posts
    12

    RE: ListAvailableServers

    Sorry, SPE (Stupid Programmer Error); one of my ADO connection strings had the data source hardcoded (leftover from testing). Thanks both...

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Hmmm... We know those as ID10T errors. Same difference!

    Glad you are working now!

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •