reference to the database
"Wong Liong Hung" <[email protected]>
| Newsgroups | gmane.comp.java.ozone.user |
|---|---|
| Message-ID | <[email protected]> |
How to get the reference to the database in a non-ozone object? As I know
this can be done in a OzoneObject by invoking database().
I try to use Env.theEnv.database or Env.currentEnv().database, however, I
got the following exception:-
Exception in thread "main" java.lang.NullPointerException
at org.ozoneDB.Database.objectForName(Database.java:132)
at Client.main(Unknown Source)
db = new LocalDatabase();
db.open ("D:/Java/ozone-1.1/db");
db.reloadClasses();
....
//in a non-ozone object
Env.theEnv.database.objectForName( "auto" );
Env.currentEnv().database.objectForName( "auto" );
Note: I'm using ozone version 1.1.
Thanks,
--LH Wong
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click