MATLAB DATABASE TOOLBOX RELEASE NOTES Podręcznik Użytkownika Strona 573

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 684
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 572
fetch
7-143
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'
After finishing with the cursor object, close it.
close(curs)
Import Data Iteratively Using the Cursor Object
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
ans =
'Victorian Doll'
'Train Set'
ans =
Przeglądanie stron 572
1 2 ... 568 569 570 571 572 573 574 575 576 577 578 ... 683 684

Komentarze do niniejszej Instrukcji

Brak uwag