When you use scanf (and any variants - fscanf, sscanf) for reading into variables, the result of any conversion is stored directly at the memory address given for that variable. Thus, if data (such as characters) are to be stored at a given address, there needs to be adequate allocated memory for that space.
However, these don't. Any ideas why?
I imagine then that with the first code:
that temp2 is declared as an adequately sized array and is thus able to store the input string correctly. (Either that, or you just got lucky and didn't over-write anything important).
fscanf(datafile, "%s", temp2);
You then assign a pointer to point to that array:
Your next sections of code are actually trying to do something different. They are trying to store the read-in string directly at the pointer address (rather than make it point to the read-in string as done earlier). This is causing problems because the memory allocated for a pointer is smaller than what you are trying to store.
teams.teamname = temp2;