Azzera filtri
Azzera filtri

connect to a Access database from matlab(2013b)

2 visualizzazioni (ultimi 30 giorni)
Sisi Ma
Sisi Ma il 4 Mar 2014
I was trying to connect to a Access database from matlab, by following the example given in matlab documentation
1 setdbprefs('DataReturnFormat','cellarray')
2 url = [['jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DSN='';DBQ='] dbpath];
3 con = database('','','','sun.jdbc.odbc.JdbcOdbcDriver', url);
4 sql = ['select * from ' table_name] ;
5 cursor = exec(con,sql);
6 cursor = fetch(cursor);
7 data.data = cursor.data;
I got the following error when I was requesting data from table A, at line 6, the error message was: Error using cell Size inputs must be integers.
Error in cursor/fetch (line 329)
outCursor.Data =
cell(rowLimit,
numberOfColumns);
I tried fetch data from other tables in the same database, it went without problem. What might be the issue?

Risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by