Click here to Skip to main content
15,915,693 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi every one ...

i am confused bout how to use Integrated security and what is it's value to set ....

"True" or "False"

and

and one thing is that ...

if my database is at other system and it has no username password than what should the value of integrated security true or false



pls suggest ...
Posted

When false, the User ID and Password are specified in the connection. When true, the current Windows account credentials are used for authentication.

So if the remote system has no login details, you probably want true.

See MSDN: SqlConnection.ConnectionString Property[^]
 
Share this answer
 
Comments
GDdixit 30-Apr-13 3:32am    
Thanks dude.....
GDdixit 30-Apr-13 3:36am    
hey i have a one question

what i open sql server ..
than it shows some things..
server name= i know this.


and what mode i have to choose for accessing database at remote location (no user id password)

sql server authentication or windows authentication ..?

i think sql server authentication and i should leave username and pass blank ......am i right dude ? rply..
OriginalGriff 30-Apr-13 3:58am    
SQL Server Authentication uses logins that are created in SQL Server and not linked to Windows user accounts. Each time the user connects to a database, they must provide a login name and password - I am not sure what will happen if you try to provide blank ones in this case, I've not had the occasion to try.

Try it out first, by setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.
 
Share this answer
 
if suppose you add true then it take by default windows authentication and if you maintain as false then it should be sqlserver authentication for that purpose you have to need provide proper user-id and password
 
Share this answer
 
You can use Windows authentication for Connection String. Add following code in your web config file

<add name="ConnectionString_Name" connectionstring="<br" mode="hold">"Server_Name;Database=Database_Name;Trusted_Connection=Yes;"
providerName="System.Data.SqlClient"/>
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900