Reputation: 7804
I dont have much experience with MsSql. I have no problem to connect to database by SQL management studio with SQL Server Authentication Mode
on ip 127.0.0.1
.
But my program fails to connect. I created file connect.UDL
for test connection and got this error
[DBNETLIB][ConnetionOpen (Invalid Instance()).] Invalid connection
Some information may usefull
Can provide more information if you need. Thanks
EDIT : I deleted everything and installed SQL SERVER 2008 R2. Everything working now. Thanks all for your effort.
Upvotes: 1
Views: 5272
Reputation: 121
Ensure you have installed SQL Server as a "Default instance" in order to be able to connect with just the IP address or hostname. If it's a "Named instance" installation, you will need to specify the hostname and instance name to connect. (i.e. MY_HOST\MY_INSTANCE)
Check out the SQL Server Configuration Manager, and under SQL Server 2008 Services section, does the installation have the "Names instance" in brackets? - That's your named instance.
Upvotes: 2