Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL SERVER CONNECTION ERROR

Author  Topic 

pfaisalbe
Starting Member

12 Posts

Posted - 2009-06-08 : 14:34:05
I am trying to connect sql server 2005 in a remote system via ip address. First I use VPN to form the network. Network pings successfully.


Here is my code in vb.net

connectionstring = "Data Source= 7.35.94.238,1433;Network Library=DBMSSOCN;Initial Catalog=rpdms;USER=NISHA;PASSWORD=SHALIMAR;"
connection = New SqlConnection(connectionstring)
connection.Open()
MsgBox(" YOU ARE NOW CONNECTED TO SQL SERVER ", MsgBoxStyle.Information, "FAISAL")


Here is the error.

Error message is


Login failed for user 'NISHA'.

Any clue ?


Thanks

Faisal

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-06-08 : 15:03:01
Can you simply connect from Enterprise Manager using the same UserName and Password or do you get the same error?

Be One with the Optimizer
TG
Go to Top of Page

pfaisalbe
Starting Member

12 Posts

Posted - 2009-06-08 : 15:52:37
I have tested the same code locally.I mean where sql server was installed. It works fine.

Any idea ?

Regards
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-06-08 : 15:59:50

I'm guessing that it's one of these:
- sql server box - security options needs to "allow remote logins"
- sql server Configuration Manager needs to enable appropriate "Client Protocols".

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -