exec doesn't return tabular data
조회 수: 17 (최근 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.
댓글 수: 0
채택된 답변
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
Walter Roberson
2018년 1월 20일
I probably made a typing mistake. See the link for the details of the exception.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Database Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!