Parsing the Ms access data base
Mostrar comentarios más antiguos
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 comentarios
Guillaume
el 28 de Mzo. de 2017
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
el 28 de Mzo. de 2017
Editada: Gopalakrishnan venkatesan
el 28 de Mzo. de 2017
Guillaume
el 28 de Mzo. de 2017
Can you show the design view of that Color table?
Gopalakrishnan venkatesan
el 28 de Mzo. de 2017
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Cell Arrays en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


