Fixed dbGetCCDInput function