Hello,

I'm testing Jim Lyon's sqaux library and I have a question regarding cursor validity. The call _sqaux_rowset_open() copies the results to a table_rowset structure. The question I have is the following: even though a table_rowset lives after the database has been closed, does this situation make sense?

In other words, say I write a cursor wrapper which encapsulates a table_rowset structure. This cursor can be used to retrieve data. If the database is closed, I can still retrieve the data from the cursor because the results were copied to the cursor. I wonder whether this makes sense. Wouldn't be more appropriate to invalidate the cursor the moment its database gets closed?

The way I see it is that a cursor belonging to a database should be invalidated when its database gets closed. The fact that the table_rowset structure holds the data is an implementation detail.

What do you guys think about this? Would you expect a cursor to live after is database has been closed?

Thanks for the comments,

-- Tito

Reply via email to