I am using ADO/Visual C++ to access SQL Server database engine. I find both the connection and command object has Execute method, as below:
https://msdn.microsoft.com/en-us/library/ms675023%28v=vs.85%29.aspx (ADO Connection) https://msdn.microsoft.com/en-us/library/ms681559%28v=vs.85%29.aspx (ADO Command)
Both will execute the SQL query and return a recordset.
In that case, what is the difference between them and why MS will provide two functions with same functionalities?