SQL Server Partition
I think you are running this in the context of master, when you are creating partitions you need to be in the context of the database, before you create the function and scheme do USE[database_name].

If you check master you will see your partition function is there, not in the database you think it is.