I saw this on another one of the million threads from people desperate to fix this same issue:
If you are viewing this forum because you've done everything right and still have the the error "cannot write to database" please check your site definition in dreamweaver. Make sure everything is point to the "RIGHT folder you deem to be considered your "Server". You cannot create, modify, or delete and that cannot be seen. So if you change your server location for testing purposes in dreamweaver make sure your site definition matches to what you are pointing to in the server or u will have conflicts. 
Everything is correct in my site definition. And I have the site defined and "remote" and "testing" both checked.
I'm hoping I can get some help. I know WebAssist is probably sick of responding to this issue, but I really need help. I have checked everything. Not saying I didn't miss anything, I'm definitely not perfect.
Thanks.


