You are using integrated security, which means that the user who is running your program needs to have the relevant access permissions on the database. If you are running the program interactively (e.g., it is not a service), then YOU need the access permissions, that is, the account that you used to log into Windows needs to be given the permissions on the database. If you do not control the database, then speak to the person who does – normally the database administrator (DBA).
You also need to consider who will be using your program in future, e.g., when it goes live. If it will not be you, then whoever it is will need to be given the database permissions, assuming you continue to use integrated security; if your program runs as a service, then the account the service uses will need to be given the database permissions.
solved Database login failed [closed]