Database[SQLite] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Connectivity : Database Package : SQLite : Database/SQLite/Open

Database[SQLite]

  

Open

  

open a new database connection

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Open( filename, create, readonly )

Parameters

filename

-

URI file name

create

-

(optional) create database if it does not exist, default is true

readonly

-

(optional) open database in read-only mode, default is false

Description

• 

The Open command opens a new database connection.

• 

If the filename is :memory:, then a private, temporary in-memory database is created for the connection. This in-memory database will vanish when the database connection is closed.

• 

If the filename is an empty string, then a private, temporary on-disk database will be created. This private database will be automatically deleted as soon as the database connection is closed.

• 

The Open command can open an existing database from Workbook if the filename is a valid Workbook URI.

Examples

withDatabaseSQLite

Attach,Bind,ClearBindings,Close,ColumnCount,ColumnNames,Execute,Fetch,FetchAll,FetchRow,Finalize,Open,Opened,Prepare,RESULT_BUSY,RESULT_DONE,RESULT_ROW,Reset,Step

(1)

dbFileToolsJoinPathkernelopts'datadir',SQLite,G20-Population.db:

connectionOpendb

SQLite database,tablemain=C:\Program Files\Maple 2019\data\SQLite\G20-Population.db

(2)

Closeconnection

SQLite database: connection closed

(3)

Compatibility

• 

The Database[SQLite][Open] command was introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

• 

The Database[SQLite][Open] command was updated in Maple 2016.