Re: Rowset.updateRow() crashes

Frank Schönheit - Sun Microsystems Germa ny <[email protected]>
Newsgroups gmane.comp.openoffice.dba.user
Message-ID <[email protected]>
Hi Marc,

> Hopefully this will solve some troubles with RowSet.count before
> using .next() for the first time, the value given is not correct.

The value is never correct unless IsRowCountFinal is TRUE ([1]). If the
number of records in your row set is small enough, then the first "next"
call will give you both IsRowCountFinal being TRUE and the correct
RowCount, simply because the RowSet does some caching, and will read
FetchSize [1] rows at once.

If the number of rows is higher than FetchSize, you cannot rely on
RowCount until you really visited all records.

Ciao
Frank

[1]http://api.openoffice.org/docs/common/ref/com/sun/star/sdb/RowSet.html#IsRowCountFinal
[2]http://api.openoffice.org/docs/common/ref/com/sun/star/sdbc/ResultSet.html#FetchSize

-- 
- Frank Schönheit, Software Engineer         [email protected] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Database                   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.