Developer's Diary
Software development, with Terry Ebdon
09-Feb-2020 Text tables & book scanner

HSQLDB text tables working

I can now connect to an existing CSV file, that has been edited by SCITE, and pick up the data correctly. There were several issues:

  1. The header row can not be present. This conflicts with the HSQLDB V2 documentation, which claims HSQLDB defaults to ignoring row 1. There's an option in the SET statement to make this explicit. Using the option results in a syntax error. Not using it fails unless the header row is deleted from the CSV.
  2. The date format I was using didn't match the one that HSQLDB writes. I need to check how flexible it is with date formats.
  3. I think it objects to leading spaces in the ID column, i.e. column 1 in my test. That makes sense if it's using Java number parsing. (HSQLDB is a Java app.)

This is good progress. Issue 1 is annoying. I'm assuming it's due to HSQLDB rather than the SQuirreL SQL Client, but that implies significant error in the HSQLDB documentation. Maybe there's a version mismatch between the HSQLDB version and the documentation version.

The HSQLDB app folder contains HTML and PDF documentation for V2.5, i.e. more recent than the V2 online document that I'd been using. But it also claims the header is ignored by default. Could it be that HSQLDB is not viewing the files as CSV? Seems unlikely as the text file handling is very generic. I'll have to look for some examples and see how they behave in SQuirreL and the supplied HSQLDB utilities.

Book scanner

It occurred to me that my book scanner should work with Windows 7. It doesn't work with Windows 10. I have two Windows 7 machines that I can try it with. Slight problem: I couldn't find power supply unit when I last looked. Pretty sure it's a 12 V PSU, but I'd prefer to use the original one if possible.

I remembered there was a plug-top PSU in the hall. It's a 12 volt supply with a coaxial connector that fits the book scanner. But why would the PSU have been in the hall, and why does it have a two pin, German, plug? It was too good to be true – the scanner needs 15 volts, not 12 volts! I accidently gave the scanner a bit of "slam" when propping it up in its crate. The scanning head is locked, so hopefully it will be OK.

08-FEB-2020 👈 Top of page 👉 10-FEB-2020

© 2020 Terry Ebdon.

Find me coding on GitHub, networking on LinkedIn, answering questions on Stack Exchange and hanging out on twitter.