The query is simple:
SELECT A, B, C FROM D WHERE A = 'a';
But the "required database Information like username password .So i m not interested to provides all the DB data." is necessary.
You can't just access a database of any type randomly: you need to tell the system which database engine to use (by using the correct set of classes: SqlConnection, SqlCommand, ... for SQL Server, MySqlConnection, MySqlCommand, ... for MySql, OleDbConnection, OleDbCommand, ... for ODBC sources like Access, Excel, ..., OracleConnection, OracleCommand, ... for Oracle.
And y-u need to provide the XXXConnection object instance with a Connection String to tell it which server (if appropriate) and which database on the server you need to access. And to prevent people who shouldn't have access to your data getting in, that connection string will probably need user name and password (for live systems, development get by with Window Authentication).
You can't get away from that, and more than you can get away from the need to have your car car with you in order to drive to the shops: it's the "connection string" that lets you drive a specific vehicle. A different "connection string" in the form of a different key is needed to drive my car.