Log on to the database server without a connection string


from the question title is there any way to connect to the database server without using string connection?

I don't wont to but the connection string in the code I want another way.

Is it possible no matter what is the database engine is.

I am building a Windows Form Application using C#.

I mean something like trusted device or windows authentication or by butting a program on server side to do the authentication

You Can't. You must have a connection string to provide the location of the server and the database name.

If you need to hide the Credentials because you're afraid of Reverse Engineering your code, then you have 2 options:

1 - Use integrated Security (Docs).

2 - Encrypt your configuration file: Follow this link Or this link.

Also, you might find this Article helpful.