Wednesday, March 21, 2012

problems connecting remotely to sql server 2005

hi. im still a bit new in handling SQL and im having problems connecting to a remote sql server 2005. i have already configured the surface area to accept remote connections and am using the connection string:

SqlConnection lasConnection = new SqlConnection("user id = sa;" +

"password = 12345; server = Naomi;" +

"Trusted_Connection = yes;" +

"database = LAS;" +

"connection timeout=30");

and it returns an error of "System.Data.SqlClient.SqlException: Login failed for user 'NAOMI\Guest' "

however, when i use the application on the same computer as the server, it has no problems connecting at all. could please point me to the right direction on how i should face this problem?

thanks in advance

hi. im still a bit new in handling SQL and im having problems connecting to a remote sql server 2005. i have already configured the surface area to accept remote connections and am using the connection string:

SqlConnection lasConnection = new SqlConnection("user id = sa;" +

"password = 12345; server = Naomi;" +

"Trusted_Connection = yes;" +

"database = LAS;" +

"connection timeout=30");

and it returns an error of "System.Data.SqlClient.SqlException: Login failed for user 'NAOMI\Guest' "

however, when i use the application on the same computer as the server, it has no problems connecting at all. could please point me to the right direction on how i should face this problem?

thanks in advance

|||

I merged these threads as they appear to be duplicates.

Are you using SSIS? If not, you might want to post in the SQL Server Data Access forum.

As a quick thought, you have the security set to a trusted connection, which means you don't have to specify a user id and password. You might want to take a look at http://www.connectionstrings.com/.

|||that was weird... when i tried a different connection string without the trusted connection then configured the surface area of the sql server for remote access it just connected like magic. hehe. sorry for being so bad at this btw. i already figured out how to connect to the server using the add data connection wizard in VS2K5 but i was wondering how do i access the data using this connection? how do i open it? coz in the old style we still need a manually configure a connection string, connect it and then do the queries.|||Still not clear on whether this is SSIS - in SSIS, you'd add a new connection manager (in the lower pane in the designer) to use a connection.

No comments:

Post a Comment