[Mono-list] Sqlite Support for Multiple Result Sets

Joseph Hill jhill at arcfocus.com
Thu May 18 19:01:28 EDT 2006

Having seen some traffic around Sqlite on the list again, I would like to
shine some light on another bug (77262) that I submitted a patch for in


The patch addresses three issues that I think are fairly important.

1)	It adds support for SqliteDataReader to return multiple result sets. 
This means that callers can execute multiple data returning statements in
a single call.  This is of particular importance for applications that
fill DataSets that have multiple tables (SqliteDataAdapter.Fill(DataSet)
depends on SqliteDataReader).
2)	Perhaps more importantly, the SqliteDataReader currently assumes that
the last statement executed is the statement that is returning the data
that the caller requested.  This is an invalid assumption, and can be a
problem if the user wants to do any clean up (i.e. remove a temp table,
fire an update, etc.) after the data returning statement is executed. 
This patch necessarily corrects that.
3)	SqliteDataReader.NextResult() should be used to position the reader at
the next result set, but currently it does the same thing as
SqliteDataReader.Read().  Even without this patch, if the reader is only
going to support one result set, then something should be done to have
NextResult always behave as if it is being called on a reader with only
one result set so that any application converted to add support for Sqlite
will not get unexpected behavior if they are depending on the correct
implementation of NextResult to move past the end of the current result
set / onto another result set with a different schema.

I don't think that the patch has sat on the shelf for so long that it's
completely useless, but I do think it is beginning to fall into disrepair.
 I would be happy to update it, but I'd like to get some idea as to
whether or not it is wanted / would be accepted before doing so.

Joseph Hill

More information about the Mono-list mailing list