[Mono-list] Bug in Mono.Data.SqliteClient?

Kamil Skalski kamil.skalski at gmail.com
Thu Jan 4 14:03:13 EST 2007


AFAIR there was a bug with multiple statements some time ago (a half
year or more).

2007/1/4, Thomas Zoechling <thomas.zoechling at gmx.at>:
> I tried your query and it seems to work for me.
>
>  From Mono.Data.SqliteClient/SqliteCommand.cs:
>
>         public SqliteDataReader ExecuteReader ()
>         {
>             return ExecuteReader (CommandBehavior.Default);
>         }
>
>         public SqliteDataReader ExecuteReader (CommandBehavior behavior)
>         {
>             int r;
>             return ExecuteReader (behavior, true, out r);
>         }
>
>         public SqliteDataReader ExecuteReader (CommandBehavior behavior,
> bool want_results, out int rows_affected)
>         {
>             Prepare ();
>
>             // The SQL string may contain multiple sql commands, so the
> main
>             // 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
>             // DataReader.
>
>
> 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 1.2.2.1 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.
>
> --Thomas
>
> 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?
> >
> > Thanks
> >
> > Chris Seaton
> > _______________________________________________
> > Mono-list maillist  -  Mono-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> >
> >
>
>
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
>
>


-- 
Kamil Skalski
http://nazgul.omega.pl


More information about the Mono-list mailing list