$alias = db.Skip ()
Populates the values of the succeeding record into dynamic variables after advancing the record pointer.
Returns 1 if successful, else 0.
display "Waiting for call"
$Provider= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Product.mdb;Persist Security Info=False"
display "Displaying records from the table"
$alias = db.Open($Provider,"SELECT * FROM Product")
while $alias.eof = FALSE
display $alias.id $alias.product $alias.productName
$alias = db.Skip()
Display "End of the table"
$alias = db.Close()
$alias = db.close()
- In the script, an ADO connection is established with the database "Product.mdb". The records are displayed by executing the Select query in Open(). The first record appropriate for the query given, is returned and stored in dynamic variables through $alias. Values in the record are accessed as $alias.id, $alias.product and $alias.productName where id, product and productName are the fields in the table "Product". To move forward and populate the next record, we use Skip(). This continues until End of file is reached.