hi all,
i'm running VS2003.NET with SQL2000 on XP.
when i try to use "datasource=localhost" in my connection string- i get "SQL server does not exist or access denide". (local) works and "=myServer" (server name) works.
my hosts file is as it should be. i'm trying to connect to the server on my machine. i use to have no problem with it in the past. i think it all went to **** when i changed my machine's name.
any ideas?
Didi you figure out wheter your loopback address 127.0.0.1 is working properly ? Thats the one TCPIP is using when adressing the localhost.HTH, jens Suessmeyer,|||127.0.0.1 pings with no problem|||OK, the I guess your TCPIP settings are not configured with default values. If you connect to SQL Server with the name it also used named pipes as a connection protocol. Try to set the ip adress for your servername in the data source part. I guess this won′t work either, this can be based on different things. You have chosen a different port for SQL Server than the default one (which is 1433), then you have to put the port into the connection strings with the syntax (Serbername,Port; e.g. SomeServerName,1500). Another thing could be that you disabled TCPIP in your configuration. PLease make that sure and tell us if it was solved.
HTH; Jens Suessmeyer.|||the port is 1433. tcpip is enabled. that's not the problem's source.|||
problem solved! this has been bugging me for days now!
solution- i unregistered and reregestered my sql server in enterprise manager and then set an alias "localhost" to it.
that's it! i don't know if it's the best way, or why it didn't work before (the alias was there in the first place) but it sure works now.
thanks guys for all the help.
|||Yes, you can alias a named instance to anything that makes sense, but I would not suggest using localhost as it really should point to the local IP address 127.0.0.1. It's correct to use "(local)" or "." to refer to the local default instance or "(local)\<your instance name>" or ".\<your instance name>" such as ".\Fred".
hth
No comments:
Post a Comment