Main Content

close

Close SQLite connection

Description

close(conn) closes the SQLite connection by using the MATLAB® interface to SQLite.

Note

The SQLite connection object remains open until you close it using the close function. Always close this object when you finish using it.

example

Examples

collapse all

Create an SQLite connection using the MATLAB® interface to SQLite and the existing database file tutorial.db, which is in the current folder.

dbfile = fullfile(pwd,"tutorial.db");
conn = sqlite(dbfile);

To import data from the database file, use the fetch function.

Close the SQLite connection.

close(conn)

Input Arguments

collapse all

SQLite database connection, specified as an sqlite object created using the sqlite function.

Version History

Introduced in R2016a