You need to GRANT ALTER DATABASE permission to the user.

GRANT ALTER ON DATABASE:: joneslocker2 TO username


Below script will help you to find what permissions are assigned at the database level :

SELECT prin.[name] [User], sec.state_desc + ' ' + sec.permission_name [Permission] 
FROM [sys].[database_permissions] sec 
  JOIN [sys].[database_principals] prin 
    ON sec.[grantee_principal_id] = prin.[principal_id] 
WHERE sec.class = 0 
ORDER BY [User], [Permission];


Check my answer here for an example on why you are getting the error.

Refer to : Database Engine Permission Basics

Permissions required to alter a database file
I have the following code:

$sql = mysql_query("UPDATE users SET name='$name' WHERE email='$email'") or die(mysql_error());
echo "&lt;h4&gt;Your information has been updated&lt;/h4&gt;&lt;br /&gt;";


&lt;form method="post" action="&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;"&gt;
    &lt;p&gt;
        &lt;label for='name'&gt;Name&lt;/label&gt;&lt;br /&gt;&lt;br /&gt;
        &lt;input class="input-text required" name="name" type="text" value="&lt;?php echo $row[name]; ?&gt;" /&gt;
    &lt;/p&gt;
    &lt;p&gt;&lt;input type="submit" name="update" value="Update" /&gt;&lt;/p&gt;
&lt;/form&gt;


After clicking Update, it updates the information in the database, but the &lt;?php echo $row['name']; ?&gt; still shows the old value. Only after refreshing the page does it show the updated information. I could have it refresh the page after updating by echoing meta refresh but I want it to still show the echo saying "Your info has been updated" which doesn't happen if I set it to refresh. Is there any solution?
