SqlOpen


SqlOpen n, filename$

This command opens a SQLite file for reading and writing.

n

The file number to be opened. Up to 10 databases may be open at any time. The file number identifies which database is being accessed. The file number ranges from 1 to 10.

filename$

This is a string expression specifying the file name and path. SQLite files usually has .db as an extension.


For example:


SqlOpen 1, "Test.db"
SqlAddTable n, table$, "Name", "Age", "Sex"
SqlClose 1


This code opens a database called "Test.db".
The file number is 1.
A table is created inside the database with three columns: "Name", "Age", "Sex".
Then file number 1 is closed.

If you execute this code on your device, you could then mount your device and find your file in Mintoris.Basic/Data.

Mintoris.Basic/Data is the root directory for all file I/O.


SqlClose


SqlAddTable


SqlDelTable


SqlInsert


SqlUpdate


SqlDelete


SqlExec


SqlGetTableNames$(n)


SQLite Cursor






Become a Patron