Programmatically set a DB user to be db_owner
To give the user DBO permissions:
EXEC sp_addrolemember N'db_owner', N'[Driver-SOC-ChrisTest]'
To make the user owner of the database (not advised):
EXEC sp_changedbowner N'[Driver-SOC-ChrisTest]'
I quite often go into the GUI, make the changes I need and then rather than saving by pressing OK, I press the Script button at the top of the dialog and send it to a new window.
This would give you the code the previous poster provided.