Tutorial: SQLite and Processing, Part I
--D. Thiebaut 14:41, 30 June 2011 (EDT)
Contents
This is a simple series of steps to get something going with SQLite and Processing. It is based on the library available from bezier.de/processing/libs/sql/#download, which is available here for redundancy.
Download
- Go to http://bezier.de/processing/libs/sql/#download and download the SQLibrary-0.1.0.zip
New PDE sketch
- Unzip the SQLibrary and copy the examples/SQLite_example1 folder into a new location. This will become the sketch you'll be using to test SQLite and Processing.
- Your new sketch, called SQLite_example1 should contain a file and a folder
- SQLite_example1.pde
- data
- the data folder should contain an SQLite database called test.db
New Java Classes
- Locate the SQL.java and SQLite.java programs in the source, de, bezier, data, sql folders, and copy them to the new SQLite_example1 folder.
- This folder should now contain
- code
- data
- SQL.java
- SQLite_example1.pde
- SQLite.java
- (folders appear in italics)
- Edit the two java programs and remove the package line.
- Futhermore, change the declaration of the class in SQLite.java to read
public class SQLite extends SQL
- The two modified files are available here.