[Mono-list] Bug in Mono.Data.SqliteClient?
thomas.zoechling at gmx.at
Thu Jan 4 13:45:31 EST 2007
I tried your query and it seems to work for me.
public SqliteDataReader ExecuteReader ()
return ExecuteReader (CommandBehavior.Default);
public SqliteDataReader ExecuteReader (CommandBehavior behavior)
return ExecuteReader (behavior, true, out r);
public SqliteDataReader ExecuteReader (CommandBehavior behavior,
bool want_results, out int rows_affected)
// The SQL string may contain multiple sql commands, so the
// thing to do is have Sqlite iterate through the commands.
// If want_results, only the last command is returned as a
// DataReader. Otherwise, no command is returned as a
As you can see, the default behavior supports multiple commands.
I attached a simple test case, that contains your query.
On Mac OS 10.4.8, mono 220.127.116.11 intel 32bit and the latest sqlite
version my test case works as expected.
Both commands get executed, and ExecuteReader() returns a DataReader
containing the results.
Chris Seaton wrote:
> Does anyone have experience using Mono.Data.SqliteClient?
> It works fine for me apart from when I have multiple Sql statements
> in a single command. If I run something like
> command = database.CreateCommand();
> command.CommandText = "update films set year = year + 10; select
> year, title from films where year >= 1980;";
> reader = command.ExecuteReader();
> I expect both statements to be executed and to read results from the
> second statement. This is what the source code seems to imply is what
> should happen. When I try it, only the first statement is executed.
> Any ideas?
> Chris Seaton
> Mono-list maillist - Mono-list at lists.ximian.com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2376 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20070104/4ff239f9/attachment.bin
More information about the Mono-list