Click here to Skip to main content
16,015,077 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have created an application in dot net using DSN to access the sql. I want to know why is it necessary to again specify user name and password in the application which is already specified in the DSN.

Is there an alternative in which we can only use DSN name in the application excluding the user name and password. If any please suggest.


Thanks in Advance,


Regards,
Rahul Jain
Posted
Updated 2-Sep-11 20:43pm
v2

The user name and password is not really required again to setup a database connection.

However, if you are asking for the username and password again (for additional security), then it is worthwhile asking for the password during, say logon, etc.
 
Share this answer
 
Not quite sure what you're asking. When you connect to a database you need to authenticate.

In Sql Server you have two options (assuming this is what you use):
- Sql Server authentication, with this you have to specify a valid Sql Server username and password
- Windows authentication, with this your current windows credentials will be used.

For more info:
- http://msdn.microsoft.com/en-us/library/ms144284.aspx[^]
- http://www.connectionstrings.com/sql-server-2008[^]
 
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