Is there any way to import long text field (longer than 128 bytes) into matlab from database?
1 view (last 30 days)
Show older comments
I have a database in which some fields are string longer than 128 bytes. When I use matlab to retrieve this field only the first 128 bytes can be read. And when I export data to database, also only 128 bytes data can be imported into the database. Is there any way to import long text field into matlab from database?
I use win7 64 bits system, matlab 2013b.
Here is the code:
databasename = 'D:\data.accdb'; conn = database('','','','sun.jdbc.odbc.JdbcOdbcDriver', ... ['jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DSN='';DBQ=' databasename]); curs = exec(conn,'select distinct distribtuion from dist'); setdbprefs('DataReturnFormat',type); if isempty(curs.Message) curs = fetch(curs,0); colunames=columnnames(curs); data = curs.Data; end
I also try the matalb database importing tools, but the results is the same.
1 Comment
dpb
on 17 May 2014
Could find nothing in the doc's on limitations. Looks like time for a query to "official" TMW support at mathworks.com
Answers (0)
See Also
Categories
Find more on Database Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!