Patch 2

Universal solution of type conversion for all types of databases