DB Adapter Fixes

All writes tested and appear to be successful. writing WI no longer crashes.