exec doesn't return tabular data

23 次查看(过去 30 天)
I'm using the SQLite database in my program. This is how I ran a statement.
conn = database('db','','','org.sqlite.JDBC','jdbc:sqlite:F:/db.db');
curs = exec(conn, 'select * from image');
curs = fetch(curs);
data = curs.Data;
It returns the data but its data type is cell. Is there anyway to get the data in table data type (with their column name)? I saw in the Matlab document it returns table data type. I don't know why mine is different.

采纳的回答

Walter Roberson
Walter Roberson 2018-1-20
https://www.mathworks.com/help/database/ug/fetch.html#outputarg_results
Notice that for SQLite that the results are cell array unless you connect by jbdc drivers
  2 个评论
Milad
Milad 2018-1-20
Oh yeah. It says that. Thanks. But what do you mean by " unless you connect by jbdc drivers" There is no jbdc driver, is it? But I'm using jdbc.
Walter Roberson
Walter Roberson 2018-1-20
I probably made a typing mistake. See the link for the details of the exception.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Database Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by