Fix ODBC storage (bug #3625, with mods)