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...
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
Check the mode of Authentication u r tryin to connect to SQL thru. Post some details about the startup-service account etc.
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.