It'd help if you told us what the exception was, but I can guess what it
is. Take off the localhost\\KIRZAD-APPLE and replace it with KIRZAD-APPLE
or the instance name. Just using the Instance name should be enough.
Another thing. Do yourself a favor and either put a password on the SA
account, or better yet, get rid of the SA account and make one of your own
with the privileges you need. Give it a strong password and change the
password on a regular basis, plus anytime an employee leaves or is fired
that may have known what it was. Hackers will target SA and if you don't
have a password on it, you are giving them the keys to the kingdom. This is
such a well known exploit you are really putting yourself at unnecessary
risk for no benefit. While putting a password on it, particularly a strong
one will help minimize this risk, getting rid of SA all together. I know
you need help connecting and not a lecture on security practices, but I
think my first comment will fix the first problem and whether or not you
take my advice about SA, I figured I'd at least mention it in case you
weren't aware of the vulnerability.
Let me know if that doesn't fix the problem.
Bill
--
W.G. Ryan MVP Windows - Embedded
http://forums.devbuzz.com
http://www.knowdotnet.com/dataaccess.html
http://www.msmvps.com/williamryan/
zenedenzidane said:
I am not connecting to my sql server running local.programming in
VB.net Database programming with statement
Dim OConn As New SqlConnection("Data
Source=localhost\\KIRZAD-APPLE;Initial Catalog=Northwind;
UID=sa;PWD=")
My server name is KIRZAD-APPLE
OConn.Open() 'Throwing exception,probably not getting the server.
Please help me.Bye.