working scriptable db access