Added length function to the connectDb library