views:

29

answers:

1

I've tried passing binary SQLite DBs over the network between different OSes and architectures - it didn't work.

What format are you all using? I've tried an unholy hack of copying SQLite's shell.c and calling shell_main() with a hacked up argc, argv, stdin with success on Mac. Pity I'm developing for the iPhone and it fails only there.

Does everyone do such awful things?

+2  A: 

This is one of the core features of SQLite.

Stable Cross-Platform Database File

The SQLite file format is cross-platform. A database file written on one machine can be copied to and used on a different machine with a different architecture. Big-endian or little-endian, 32-bit or 64-bit does not matter. All machines use the same file format. Furthermore, the developers have pledged to keep the file format stable and backwards compatible, so newer versions of SQLite can read and write older database files.

Most other SQL database engines require you to dump and restore the database when moving from one platform to another and often when upgrading to a newer version of the software.

http://sqlite.org/different.html

Check the code that's passing the databases. Do a byte-by-byte comparison to make sure they're equal after transfer. This definitely should be working.

Beyond Compare has good binary file comparison support.

Sam
You're quite right Sam. Our testing was borked by the simple fact that along the way, an ascii ftp put was used. Switching to binary solved everything.Annoying that the headers were preserved by an ascii ftp put but the data/table structure, less so!
gavinbeatty