%% Create SQLite Connection to Existing Database File
% Create an SQLite connection to the MATLAB® interface to SQLite using the existing database file tutorial.db. Specify the file name in the current folder.

dbfile = fullfile(pwd,'tutorial.db');

conn = sqlite(dbfile)

% conn is an sqlite object with these properties:
% Database — SQLite database file name.
% IsOpen — SQLite connection is open.
% IsReadOnly — SQLite connection is writable.
% To import data from the database file, you can use the fetch function.
%
% Close the SQLite connection.

close(conn)

%
% Copyright 2012 The MathWorks, Inc.