exec doesn't return tabular data
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Milad
am 20 Jan. 2018
Kommentiert: Walter Roberson
am 20 Jan. 2018
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.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 20 Jan. 2018
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 Kommentare
Walter Roberson
am 20 Jan. 2018
I probably made a typing mistake. See the link for the details of the exception.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Database Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!