DB bug fix

totlen & maxlen not initialized in Open_DB