Parsing the Ms access data base
古いコメントを表示
I have a database with two tables. I tried to extract the data from the tables and i was able to extract also using the command below,
rs=invoke(hopen,'OpenRecordset','Data');
fieldlist=get(rs,'Fields');
ncols=get(fieldlist,'Count');
for c=1:double(ncols)
fields{c} = get(fieldlist,'Item',c-1);
resultset.columnnames{c} = get(fields{c},'Name');
end;
nrecs=0;
while get(rs,'EOF') == 0
nrecs = nrecs + 1;
for c=1:ncols
resultset.data{nrecs,c} = get(fields{c},'Value');
end;
invoke(rs,'MoveNext');
end
Only problem is when I have a multiple values in the cell i can able to extract only first element in the cell.
For example,

in the above figure, the column carsSelected consists of multiple value in the cell. In this case i cannot able to extract all the elements in the cell? How can I do this?
Thanks a lot
4 件のコメント
Guillaume
2017 年 3 月 28 日
As far as I know you cannot have multiple values in a column of a single record (what you call cell). So, what is the type of that CarsSelected column, and isn't that 1;2;3;4 drop down simply a string (which your code should retrieve in its entirety).
If you can, attach your database.
Gopalakrishnan venkatesan
2017 年 3 月 28 日
編集済み: Gopalakrishnan venkatesan
2017 年 3 月 28 日
Guillaume
2017 年 3 月 28 日
Can you show the design view of that Color table?
Gopalakrishnan venkatesan
2017 年 3 月 28 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


