first_page

The Gulf between SQLite 3.3.7 and 3.2.8

Ah… my perceived chaos whenever there’s more than three things… There is SQLite on Windows and SQLite on Linux. There is SQLite that runs in PDO/PHP and there is the latest version that does not (3.3.7—as far as I know… in my current condition…)…

One of the problems swirling around here is that my version of PDO SQLite on Ubuntu is 3.2.8 (the Debian sqlite3 package is also 3.2.8)—but my earliest SQLite triumph was using System.Data.SQLite on Windows to export my Funky Knowledgebase to a SQLite 3.3.7 database—which quickly got out of synch with the old SQL Server data with new (triumphant) records. So the challenge that presented itself over the last 12 to 24 hours was getting the SQLite data out of 3.3.7 to 3.2.8.

Using .dump to meet this challenge quickly revealed that, according to Notepad++, SQLite was spitting out hot-fire line breaks in Macintosh format. What! I languished for two (three) hours too many hand-deleting Linux line breaks among over 20,000 lines of INSERT statements until it dawned on me to write a quick and dirty .NET procedure to dump the data myself.

I’m still willing to bridge this gulf to fight for my freedom from commercial bloatware.

Comments

Tom, 2006-12-14 18:24:50

There's a little unix utility that will serve you well called "tr"

cat yourfile.whatever | tr '\r' '\n' > yourfile2.whatever

This will convert mac linebreaks to linebreaks that linux and even windows notepad can read.

rasx()