fetching data from access database in MATLAB R2015b - Reg
조회 수: 1 (최근 30일)
이전 댓글 표시
I executed a query in MATLAB R 2013a with the following code.
conn = database('MultiProductInventory','admin','admin');
query1 = ['SELECT ALL ID FROM "stocks" WHERE PI=',num2str(x(1))];
query2=[''];
for fidx=1:8
query2 = strcat(query2,sprintf('and F%d=',fidx),num2str(x(fidx+1)));
end
query3 = strcat(query1,query2);
curs=exec(conn,query3);
curs=fetch(curs);
y1= curs.Data;
It worked well in MATLAB R2013a. The same query when i tried to execute in MATLAB R 2015b. It is displaying the error message:Undefined function fetch for input argument of type struct. what changes i should make to execute the query in R2015b.
댓글 수: 0
답변 (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!