aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes strange behaviour of Class Data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "strange behaviour of Class Data" Watch "strange behaviour of Class Data" New topic
Author

strange behaviour of Class Data

Martin Habicht
Greenhorn

Joined: Nov 07, 2001
Posts: 17
Hi
just started to dig into the provided SCJD code and wanted to run a little test program, to display the content of the database. I was surprised to see, that only some records were displayed and only half the fields. However if I put my (single threaded) application asleep, i get all records. (but still only the first 4 fields).
Well, I just wanted to ask whether others experienced the same strange behaviour or whether this is even part of the problem to solve.
thanks for your comment - the full source of my test program is below.

-Martin

package suncertify.db;
public class DbTest {
private static String dbname = "F:/j2se/jdk131/src/suncertify/db/db.db"; //please change to your path!
public static void main(String[] argv) {
try {
Data data = new Data(dbname);
int count = data.getRecordCount();
System.out.println("Database contains the follwing # of records: " + count + "\n");
DataInfo rec = null;
for (int i = 1; i<= count; i++)
{
System.out.println("\n"+i);
rec = data.getRecord(i);
System.out.println(rec);
//Thread.sleep(50); // if the threads sleeps all records will appear?!?

}

} catch (Exception e) {
e.printStackTrace();
}
}
}
Bal Sharma
Ranch Hand

Joined: Sep 19, 2001
Posts: 273
Hey Martin:
Try following link. Is not that what you wanted? Is it?
See: [URL= [/URL] Here
Good Luck. BK

[This message has been edited by Bal Sharma (edited November 07, 2001).]
Martin Habicht
Greenhorn

Joined: Nov 07, 2001
Posts: 17
thanks for the reply. concerning the code snipplet you're right - i haven't read the faq throughly.

But after your input I solved the real problem, which was caused by KAWA that didn't display all lines (scrolling was not an issue - some records were completely missing!). running directly from a dos box works fine. sometimes the solution is so simple...

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: strange behaviour of Class Data