What is the difference between Connection.Execute and Command.Execute in ADO?


I am using ADO/Visual C++ to access SQL Server database
engine. I find both the connection and command object has Execute method, as

(ADO Connection)

(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?

They're not the same. Read the links you posted. I'm sure that there are other subtleties but one returns a result set... the other can return a result set, a stream, or NOTHING.