Database Error: a query was performed before the connected was initialised.