MATLAB DATABASE TOOLBOX RELEASE NOTES Uživatelská příručka Strana 468

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 684
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 467
7 Functions — Alphabetical List
7-38
ans =
'Victorian Doll'
'Train Set'
'Engine Kit'
Rerun the fetch function to return the second three rows of data.
curs = fetch(curs,3);
View the data.
curs.Data
ans =
'Painting Set'
'Space Cruiser'
'Building Blocks'
Close the cursor object.
close(curs)
Import Rows Iteratively Until You Retrieve All Data
Working with the dbtoolboxdemo data source, use the rowLimit argument to retrieve
the first two rows of data, and then rerun the import using a while loop, retrieving
two rows at a time. Continue until you have retrieved all data, which occurs when
curs.Data is 'No Data'.
curs = exec(conn,'select productdescription from producttable');
% Initialize rowLimit
rowLimit = 2
% Check for more data. Retrieve and display all data.
while ~strcmp(curs.Data,'No Data')
curs = fetch(curs,rowLimit);
curs.Data(:)
end
rowLimit =
2
Zobrazit stránku 467
1 2 ... 463 464 465 466 467 468 469 470 471 472 473 ... 683 684

Komentáře k této Příručce

Žádné komentáře