In .Net, is there any functional difference between creating a new SqlCommand object and attaching a SqlConnection to it and calling CreateCo
SqlCommand
SqlConnection
CreateCo
No, they are the same thing.
I disassembled SqlConnection.CreateCommand and found this:
SqlConnection.CreateCommand
public SqlCommand CreateCommand() { return new SqlCommand(null, this); }
which proves that they really are the same thing.