This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes strange RecordComparator behavior Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "strange RecordComparator behavior" Watch "strange RecordComparator behavior" New topic
Author

strange RecordComparator behavior

Greg Schwartz
Ranch Hand

Joined: May 11, 2003
Posts: 132
I was wondering if anyone else has run into problems using the RecordComparator class to sort records by a value of type "long" that is representing a date.
The following scenario describes this problem: store 5/8/03 into an rms database
store 5/8/03 into an rms database
store 5/9/03 into an rms database
**retreiving these records works fine as they are retreived in the proper sorted order**
If I then store a record with 5/7/03 and retreive them all using a RecordComparator that compares these dates, the 5/7/03 transaction does not come before the 5/8/03 transactions.
If anyone has any ideas on what would be causing this behavior, please let me know. I'm not using multi-threading and have been rebuilding and destroying the enumerator as needed.
Thanks so much,
Greg


Greg Schwartz<br />Mobatech, LLC<br />greg@mobatech.com<br /><a href="http://www.mobatech.com" target="_blank" rel="nofollow">www.Mobatech.com</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: strange RecordComparator behavior
 
Similar Threads
NX:Another way of accessing database
RecordComparator
RMS on J-Sky (JPhone) emulator
RMS - what is the max size
vector vs hashtable