Database[SQLite] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

Database[SQLite]

  

Attach

  

attach a new database to the opened connection

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Attach( connection, filename, name )

Parameters

connection

-

database connection obtained using Open command

filename

-

URI file name

name

-

name of database

Description

• 

The Attach command adds another database file to the current database connection and is a convenience command implementing the ATTACH DATABASE statement.

• 

The database-names main and temp refer to the main database and the database used for temporary tables. The main and temp databases cannot be attached or detached.

• 

The Attach 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)

Create in memory database

dbOpen:memory::

Create and attach another in memory database

Attachdb,:memory:,database2:

Opened databases

Openeddb

tablemain=,database2=

(2)

Close database connection

Closedb:

Compatibility

• 

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

• 

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

• 

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

See Also

Database[SQLite][Open]