Page 1 of 1

witpStaff question & suggestion

Posted: Wed Jul 29, 2009 2:54 am
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.

RE: witpStaff question & suggestion

Posted: Wed Jul 29, 2009 3:55 pm
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.

RE: witpStaff question & suggestion

Posted: Wed Jul 29, 2009 5:51 pm
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

RE: witpStaff question & suggestion

Posted: Sat Aug 15, 2009 7:19 am
by Reg

OpenOffice works like a charm.

Cool.... [8D]


RE: witpStaff question & suggestion

Posted: Sat Aug 15, 2009 8:25 am
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 [:(]

RE: witpStaff question & suggestion

Posted: Sat Aug 15, 2009 8:33 am
by Reg
Me too. I suspect we don't have the full distribution.

RE: witpStaff question & suggestion

Posted: Sat Aug 15, 2009 8:56 am
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.