Dear Jan
Thank you for your answer, but the solution doesn't work.
I send this message I few month ago to say that the 'revCurrentRecordIsLast' and 'revCurrentRecordIsFirst' in Dreamcard (and probably in Revolution) doesn't work (see the following message):
Any other solution ?
Best regards
J�r�me
Bonjour Jan,
Yes I use MySQL. After creating a recordset, I execute: 'revMoveToFirstRecord' (go to the first record). Results:
'revNumberOfRecords' : 3 'revCurrentRecord' : 0 'revCurrentRecordIsLast' : false 'revCurrentRecordIsFirst' : false ???
Then I execute 'revMoveToNextRecord' (go to the second record). Results:
'result() : true 'revNumberOfRecords' : 3 'revCurrentRecord' : 1 'revCurrentRecordIsLast' : false 'revCurrentRecordIsFirst' : false
Then I execute 'revMoveToNextRecord' (go to the third and last record). Results:
'result() : true 'revNumberOfRecords' : 3 'revCurrentRecord' : 2 'revCurrentRecordIsLast' : false ?? 'revCurrentRecordIsFirst' : false
Then I execute 'revMoveToNextRecord' (just to see). Results:
'result() : false 'revNumberOfRecords' : 3 'revCurrentRecord' : 2 'revCurrentRecordIsLast' : true 'revCurrentRecordIsFirst' : false
I hope it is clear.
J�r�me Rosat
Le 6 nov. 04, � 06:25, Jan Schenkel a �crit :
--- J�r�me Rosat <[EMAIL PROTECTED]> wrote:Bonjour tout le monde,
In Dreamcard documentation, for the revCurrentRecordIsLast function, it's written that "Returns whether the current record is the last record in a record set (database cursor)."
In my recordset with 3 records, when the cursor is on the first record, revCurrentRecordIsLast return false. It's Ok for me. After moving the cursor with revMoveToNextRecord to the second record, revCurrentRecordIsLast return false. It's still OK for me. If I move the cursor to the third and last record, revCurrentRecordIsLast still return false. With the upper definition, the result should be true. The third record is the last one. But revCurrentRecordIsLast return true only if I use
revMoveToNextRecord once again. In short, revCurrentRecordIsLast return true when revMoveToNextRecord return an error. And it is the same for revCurrentRecordIsFirst.
Is it a bug or I'm stupid ?
J�r�me Rosat
Bonjour J�r�me,
What does the function 'revNumberOfRecords' return for that result set ? And is this still on MySQL ?
Jan Schenkel.
===== Join us at the European Revolution Conference November 14-16, MALTA. ~ http://TechieTours.com/Rev/
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
__________________________________ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com
_______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution
Le 13 f�vr. 05, � 22:54, Jan Schenkel a �crit :
--- J�r�me Rosat <[EMAIL PROTECTED]> wrote:Dear all,
I use a stack with a MySQL database. To move through the records in a record set I use this script:
revMoveToFirstRecord thisCursor repeat for revNumberOfRecords(thisCursor) times -- bla bla revMoveToNextRecord thisCursor end repeat
When I use the same stack with a Access 97 database and a ODBC connection and the same number of records, the revNumberOfRecords function return -1.
How to resolve this problem ?
J�r�me Rosat
Hi J�r�me,
This particular problem has been around forever, and is appearently a conflict between Access and the revdb ODBC driver. Your best solution is to use the 'revdb_iseof()' or 'revCurrentRecordIsLast()' functions to determine the end of your loop : -- revMoveToFirstRecord thisCursor repeat forever -- bla bla if revCurrentRecordIsLast() then exit repeat else revMoveNextRecord thisCursor end repeat --
Hope this helped,
Jan Schenkel.
===== Quartam - Tools for Revolution <http://www.quartam.com>
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
__________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com
_______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution
J�r�me Rosat 13, chemin des Palettes 1212 Grand-Lancy
022 880 20 70 _______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution
