witpStaff question & suggestion

This new stand alone release based on the legendary War in the Pacific from 2 by 3 Games adds significant improvements and changes to enhance game play, improve realism, and increase historical accuracy. With dozens of new features, new art, and engine improvements, War in the Pacific: Admiral's Edition brings you the most realistic and immersive WWII Pacific Theater wargame ever!

Moderators: wdolson, MOD_War-in-the-Pacific-Admirals-Edition

Post Reply
erstad
Posts: 1963
Joined: Mon Aug 02, 2004 11:40 pm
Location: Midwest USA

witpStaff question & suggestion

Post by erstad »

Question: Where do I find the format for the CSV files (e.g., the available LCUs file) that DumpDB creates. (By which I mean the column definitions. I do get that the format is Comma Separated [:D])

Suggestion: It would be handy if the DumpDb added a header row with column titles in front of the CSV data.
Woos
Posts: 277
Joined: Sun Jun 05, 2005 5:12 pm
Location: Germany

RE: witpStaff question & suggestion

Post by Woos »

Well, the correct answer to your question is that the naming (and typing) of the rows in the generated CSV files can be found in the schema of the database (which can be explored with included tools, just open a shell in the database's directory (e.g. tools/witpstaff/db1), execute the following command in it

Code: Select all

java –cp ..\hsqldb.jar org.hsqldb.util.DatabaseManagerSwing
and then enter something like what can be seen in the picture below into the window popping up.
Image
Afterwards you can see the structure of all the dumped tables in the treeview on the left. If you know any SQL you can also directly query the database in the view at the top of the window.

OK, but that is probably not what you wanted to know. Normal people (i.e. non-computer scientist) are typically not interested in SQL-shells. SO on automatically adding a header line:

For the DumpAll option there will never be a top row in the csv files with the names of the column. It simply dumps the complete database and is supposed to be used only by people who know what they do.

For the other dump options (you actually can create your own by adding an SQL view to the database whose name starts with "DumpView" (note: case sensitive)) in principle adding such a line is intended. Problem is: HsqlDB doesn't do it on its own, so I have to go through the DB schema, get the names, write them into a file in correct syntax and then copy the rest of the file (previously generated automatically by HSQLDB) to it. Don't expect that too soon.
Attachments
ScreenshotConnect.gif
ScreenshotConnect.gif (13.14 KiB) Viewed 483 times
morphin
Posts: 756
Joined: Fri Apr 26, 2002 6:51 pm
Location: Switzerland

RE: witpStaff question & suggestion

Post by morphin »

Thank's to Woos i also managed to connect OpenOffice to HSQLDB. And there i can very easy generate a full ERD. I will play around this a little bit. My goal is to do my planning directly with an openoffice sheet or Form

Andy
User avatar
Reg
Posts: 2793
Joined: Fri May 26, 2000 8:00 am
Location: NSW, Australia

RE: witpStaff question & suggestion

Post by Reg »


OpenOffice works like a charm.

Cool.... [8D]

Cheers,
Reg.

(One day I will learn to spell - or check before posting....)
Uh oh, Firefox has a spell checker!! What excuse can I use now!!!
User avatar
Local Yokel
Posts: 1494
Joined: Sun Feb 04, 2007 12:55 pm
Location: Somerset, U.K.

RE: witpStaff question & suggestion

Post by Local Yokel »

ORIGINAL: Woos

Well, the correct answer to your question is that the naming (and typing) of the rows in the generated CSV files can be found in the schema of the database (which can be explored with included tools, just open a shell in the database's directory (e.g. tools/witpstaff/db1), execute the following command in it

Code: Select all

java –cp ..\hsqldb.jar org.hsqldb.util.DatabaseManagerSwing
and then enter something like what can be seen in the picture below into the window popping up.

Afraid this returns the following error for me:

Code: Select all

"C:\.. .. ..\WitP-AE\tools\witpstaff\Test1>java -cp ..\hsqldb.jar org.hsqldb.util.Da
 tabaseManagerSwing
 Exception in thread "main" java.lang.NoClassDefFoundError: ûcp
 Caused by: java.lang.ClassNotFoundException: ûcp
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
 Could not find the main class: ÔÇôcp.  Program will exit."
WitpStaff itself is working fine, but the name of the main class looks awfully garbled to me [:(]
Image
User avatar
Reg
Posts: 2793
Joined: Fri May 26, 2000 8:00 am
Location: NSW, Australia

RE: witpStaff question & suggestion

Post by Reg »

Me too. I suspect we don't have the full distribution.
Cheers,
Reg.

(One day I will learn to spell - or check before posting....)
Uh oh, Firefox has a spell checker!! What excuse can I use now!!!
User avatar
Local Yokel
Posts: 1494
Joined: Sun Feb 04, 2007 12:55 pm
Location: Somerset, U.K.

RE: witpStaff question & suggestion

Post by Local Yokel »

Thanks for the link, Reg! The same thought crossed my mind about the distribution.

My coding skills used to be OK but stopped short of Dot.Net. I was hoping I'd find a database driver I could use to establish a connection using earlier versions of Visual Basic/VBA. I'm going to take a look at Open Office to see how I get on with that.
Image
Post Reply

Return to “War in the Pacific: Admiral's Edition”