I am using the following SQL query and the ExecuteScalar() method to fetch data from an Oracle database:
ExecuteScalar()
sql = \"select username from usermst wh
Try this
sql = "select username from usermst where userid=2" string getusername = Convert.ToString(command.ExecuteScalar());