SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 sql server connect to database
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jassie
Constraint Violating Yak Guru

308 Posts

Posted - 02/12/2013 :  18:02:42  Show Profile  Reply with Quote
if the following is in the connection string in an app.config file, the following will use the sql server login and not the
windows user login correct?

The following is a connection string that points to a sql server 2008 r2 database.

<connectionStrings>
<add name="RPCSS_DEVConnectionString"
connectionString="Data Source=dev;Initial Catalog=DEV2;User Id=myUsername;Password=myPassword;"
providerName="System.Data.SqlClient" />
</connectionStrings>

Also can you tell me if there is any way for the windows user name and password to be used when connecting to the
sql server 2008 r2 database? If so, can you tell me what the connection sting would be so I know to avoid that connection string?

tkizer
Almighty SQL Goddess

USA
37157 Posts

Posted - 02/12/2013 :  19:17:40  Show Profile  Visit tkizer's Homepage  Reply with Quote
That connection string is using SQL authentication, so yes a SQL login and not a Windows login.

You can't specify windows userid/password, you would specify trusted connection though.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000