Poradniki ASP

ASP DOM

Samouczek WP

Wprowadzenie do stron internetowych Strony internetowe Brzytwa Układ stron internetowych Foldery stron internetowych Globalne strony internetowe Formularze stron internetowych Obiekty stron internetowych Pliki stron internetowych Bazy danych stron internetowych Pomocnicy stron internetowych Strony internetowe WebGrid Wykresy stron internetowych Adres e-mail stron internetowych Bezpieczeństwo stron internetowych Strony internetowe Opublikuj Przykłady stron internetowych Klasy stron internetowych

Brzytwa ASP.NET

Wprowadzenie do brzytwy Składnia brzytwy Zmienne C# brzytwy Pętle C# brzytwy Razor C# Logika Zmienne VB brzytwy Pętle Razor VB Razor VB Logic

ASP klasyczny

Wprowadzenie do ASP Składnia ASP Zmienne ASP Procedury ASP Warunki korzystania z ASP Zapętlanie ASP Formularze ASP Pliki cookie ASP Sesja ASP Aplikacja ASP ASP #zawiera ASP Global.as ASP AJAX e-mail ASP Przykłady ASP

Odniesienie do ASP

Funkcje ASP VB Słowa kluczowe ASP VB Odpowiedź ASP Zapytanie ASP Aplikacja ASP Sesja ASP Serwer ASP Błąd ASP System plików ASP Strumień tekstowy ASP Dysk ASP Plik ASP Folder ASP Słownik ASP ASP AdRotator Przeglądarka ASP Łączenie treści ASP Rotator treści ASP Szybkie ref. ASP

Samouczek ADO

Wprowadzenie ADO Connect Zestaw rekordów ADO Wyświetlacz ADO Zapytanie ADO Sortuj ADO ADO Dodaj Aktualizacja ADO ADO Usuń Demo ADO Przyspieszenie ADO

Obiekty ADO

ADO Polecenie Połączenie ADO Błąd ADO Pole ADO Parametr ADO Nieruchomość ADO Rekord ADO Zestaw rekordów ADO Strumień ADO Typy danych ADO

Metoda ADO GetRows


❮ Pełne odniesienie do obiektu zestawu rekordów

Metoda GetRows kopiuje wiele rekordów z obiektu Recordset do tablicy dwuwymiarowej.

Składnia

vararray=objRecordset.GetRows(rows,start,fields)

Parameter Description
rows Optional. A GetRowsOptionEnum value that specifies the number of records to retrieve. Default is adGetRowsRest.

Note: If you omit this argument it will retrieve all records in the Recordset

start

Optional. What record to start on, a record number or a BookmarkEnum value

fields Optional. If you want to specify only the fields that the GetRows call will return, it is possible to pass a single field name/number or an array of field names/numbers in this argument

Przykład

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("northwind.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
rs.Open "Select * from Customers", conn

'The first number indicates how many records to copy
'The second number indicates what recordnumber to start on
p=rs.GetRows(2,0)
rs.close
conn.close

'This example returns the value of the first
'column in the first two records
response.write(p(0,0))
response.write("<br>")
response.write(p(0,1))

'This example returns the value of the first
'three columns in the first record
response.write(p(0,0))
response.write("<br>")
response.write(p(1,0))
response.write("<br>")
response.write(p(2,0))
%>

GetRowsOptionEnum Wartości

Constant Value Description
adGetRowsRest -1 Retrieves the rest of the records in the Recordset object

Wartości BookmarkEnum

Constant Value Description
adBookmarkCurrent 0 Starts at the current record
adBookmarkFirst 1 Starts at the first record
adBookmarkLast 2 Starts at the last record

❮ Pełne odniesienie do obiektu zestawu rekordów