Code 1 is a fetch (hence the dataset which is a data storage object) and code 2 simply runs a command (an insert) into the dbase. However the cmd.CommandText() is commented (and thus isn't set) so that code will actually throw an exception.
EDIT: Have a look here: ADO.Net 2.0 Documentation MSDN