We present 1.4-mm BIMA observations with subarcsecond resolution of the bright dust and molecular line emission from hot cores associated with a sample of four ultracompact HII regions: G9.62+0.19, G10.47-0.03, G29.96-0.02, G31.41+0.31. Density power laws can reproduce the observed continuum emission but break down on scales smaller than 2000 AU. A total of 38 transitions from 18 species are detected, with G10.47 and G31.41 showing the greatest number of lines. In particular, these sources display emission from two collisionally-excited transitions of methanol lying more than 950 K above the ground state. Outflows traced by H2S emission provide evidence for embedded exciting sources and the observed morphology of molecular lines is consistent with internal heating of the cores.