Index: System.Data.SQLite/SQLiteConnection.cs ================================================================== --- System.Data.SQLite/SQLiteConnection.cs +++ System.Data.SQLite/SQLiteConnection.cs @@ -388,11 +388,11 @@ internal int _transactionLevel; /// /// If set, then the connection is currently being disposed. /// - private bool _disposing; + private bool _disposing; /// /// The default isolation level for new transactions /// private IsolationLevel _defaultIsolation; @@ -429,11 +429,11 @@ /// /// The extra behavioral flags for this connection, if any. See the /// enumeration for a list of /// possible values. /// - private SQLiteConnectionFlags _flags; + private SQLiteConnectionFlags _flags; /// /// Default command timeout /// private int _defaultTimeout = 30; @@ -1637,11 +1637,11 @@ // string parser as the built-in (i.e. framework provided) one is // unavailable. // return ParseConnectionString(connectionString); #endif - } + } #if !PLATFORM_COMPACTFRAMEWORK /// /// Manual distributed transaction enlistment support /// Index: System.Data.SQLite/SQLiteConvert.cs ================================================================== --- System.Data.SQLite/SQLiteConvert.cs +++ System.Data.SQLite/SQLiteConvert.cs @@ -1296,19 +1296,24 @@ /// /// A command was created using the connection. /// NewCommand = 7, + /// + /// A data reader was created using the connection. + /// + NewDataReader = 8, + /// /// The connection is being closed. /// - Closing = 8, + Closing = 9, /// /// The connection was closed. /// - Closed = 9 + Closed = 10 } /// /// This implementation of SQLite for ADO.NET can process date/time fields in databases in only one of three formats. Ticks, ISO8601 /// and JulianDay. Index: System.Data.SQLite/SQLiteDataReader.cs ================================================================== --- System.Data.SQLite/SQLiteDataReader.cs +++ System.Data.SQLite/SQLiteDataReader.cs @@ -100,14 +100,20 @@ _version = _command.Connection._version; _baseSchemaName = _command.Connection._baseSchemaName; _commandBehavior = behave; _activeStatementIndex = -1; - _rowsAffected = -1; - - if (_command != null) - NextResult(); + _rowsAffected = -1; + + if (_command != null) + { + SQLiteConnection.OnChanged(_command.Connection, + new ConnectionEventArgs(SQLiteConnectionEventType.NewDataReader, + null, null, _command, null, new object[] { this, behave })); + + NextResult(); + } } /////////////////////////////////////////////////////////////////////////////////////////////// #region IDisposable "Pattern" Members