Firebird’s Dialects

After spending some time trying to figure out why firebird didn’t like quoted identifiers I discovered that I had missed that the database supports multiple sql “dialects” (quoted identifiers are needed e.g. in ‘CREATE TABLE “aTableName”….’ — Base uses quoted identifiers everywhere in fact — previously quotation marks were replaced with spaces which was a somewhat ugly/wrong solution to the problem). These dialects are:

  • 1: The original dialect for IB5.5 and earlier which doesn’t supported quote identifiers, the various sql date/time types etc.
  • 3: The dialect for IB6 and newer which supports quoted identifiers, various sql date/time types etc.

Previously dialect 1 had been in use, and I had no clue that this was the issue. As part of the journey towards discovering this I did however manage to add support for passing usernames/password to firebird (although this is unused so far — remote db support still needs to be added, but only really involves parsing a connection string — embedded dbs are accessed without usernames and passwords), some of the database metadata definitions were also cleaned up/implemented.

In other news, the sdbc driver can now list the names of all the columns in a table except for the first column. It doesn’t seem to be an off-by-one error as the methods to get column names are all called and return data as expected — but it definitely is a bug somewhere in the driver.

Tagged with: , , ,
Posted in GSOC2013, LibreOffice