On windows some compilers do not understand the %lld format specifier.

The attached patch circumvents the problem with the help of functions from SQLite.

--tsbg