I'm sorry, maybe i've not your knowledge ....
...but could you tell me why in your mind database library for .net as MySql connector, ODBC for Postgres, all Access drivers, NPGSQL and many others permit read hasrows properties also after data association as i say and SQlite not ?
In addiction..what change in backward compatybilities ? I think nothing...
Who use datareader with "while .read do ...." continue to use in same way....but many others developer, who use HasRows for check if datareader has or had records will be gratified to this new capacity...don't think ??



Il 14/03/2014 2.01, Joe Mistachkin ha scritto:
Stefano Ravagni wrote:
Only SQL Server don't follow this line for what i know, and because of
that i abandon it in favor of SQlite (as file system database) and
PostgreSQL.

Well, the SQL Server provider is included with the .NET Framework itself
and I assume that they know how to properly implement their own database
access interfaces.

Tell me please because i'm not sure to had understand.... in next
version could i check dati.hasrows and have to return TRUE value also
after data association or have i to combine the use with StepCount
properties ?

No, for several reasons:

1. It would not be a backward compatible change.

2. It would not be compatible with several other ADO.NET providers
    (e.g. SQL Server).

3. The IDataReader.Read() method return value can be used instead (see
    example below) and has the additional benefit of being more widely
    available since it is required on any class that implements the
    IDataReader interface, not just those derived from the DbDataReader
    abstract class.

        bool hasRows = false;

        do {
                if (dataReader.Read()) {
                        hasRows = true;
                        // process this row...
                } else {
                        // no more rows.
                        break;
                }
        } while (true);

        if (hasRows) {
                // more code here...
        }

--
Joe Mistachkin

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to