Got db access working