This post was originally written for Iguana 5 so it contains version 5 screenshots, and may contain out of date references.
In this tutorial we will create a SQLIte database called “test” and create tables that match those defined in the “example/demo.vmd” installed with Iguana. This database is used in several of our tutorials and other examples.
You can also change the database name and/or substitute your own VMD file, see the Note after the tutorial steps.
Note: The code that reads the table information from the VMD file is a bit obscure! But that is why we created it for you, so you don’t have to worry about how it works.
Tutorial Instructions [top]
- Create a temporary channel, with the the following settings:
- Source = LLP Listener
- Destination = To Translator
- Channel name = Create SQLite DB
- Open the Translator by clicking the Edit Script link at the bottom of the Destination tab.
- Download and import the Create_SQLite_DB_To_Translator.zip project file.
- Confirm that the database and tables are created.
Click on the Result Set annotation on line 18 to confirm that the tables are created:
Tables patient and kin were created (if you use a different VMD the table names may be different).
- Delete the temporary channel.
Note: To customize the database name and/or VMD file:
- After step 3 above
- Change the global variables for the database name and/or VMD
- Change SQLITE_DB to your desired database name.
- Change VMD_FILE to the path of your VMD file.
- Then complete steps 4 and 5.
Tip: You can also use an existing channel to create a SQLite database. Just save a milestone, load and run the project file, then revert to milestone you just saved.