I just thought of something that may be a problem here... Ruslan, maybe you could answer this best. Will the function keep a lock on the table? It is returning that cursor but it doesn't set it's internal cursor to Nil. Is setting the cursor to Nil outside that function good enough to release a lock on that table? Deane