I have created a login in SQL Server 2008 with username= smart_provider and password = password.
Now, I added the following connection string to my project:
<add name="DB_Connection"
connectionString="data Source=.\MATTHEW;Initial Catalog=Provider;User Id=smart_provider;Password=password;Integrated Security=True"
providerName="System.Data.SqlClient"/>
Now, for some reason or another, even if I change the password to an incorrect one, the program still works and fetches the data from the database? What am I doing wrong please? Thank you
Because you have Integrated Security=True". If you need to use password, change it to false.
Set Integrated Security=false;
"Integrated Security" or "Trusted_Connection" When false, User ID and Password are specified in the connection. When true, the current Windows account credentials are used for authentication. If User ID and Password are specified and Integrated Security is set to true, the User ID and Password will be ignored and Integrated Security will be used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With