フィルターのクリア

Sqlite database relative path

5 ビュー (過去 30 日間)
ashish
ashish 2016 年 5 月 24 日
回答済み: Kanupriya Singh 2020 年 7 月 4 日
Hi, I am connecting to a local database using absolute path. Is there a way to use relative path for the database function:
conn=database('/Users/ashish/Desktop/db1.sq3', ...
'','','sqlite.JDBC.jar','jdbc:sqlite://Users/ashish/Desktop/db1.sq3');
Thanks - Ashish

回答 (1 件)

Kanupriya Singh
Kanupriya Singh 2020 年 7 月 4 日
If your MATLAB file is in the same directory as the SQLite database file, then you need to only specify the name of the database file and not the entire absolute path.
To connect MATLAB to SQLite, use the following function:
filename = "mock.db";
conn = sqlite(filename);

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by