Availability: |
| |||
JavaScript syntax: | nes | myResultSet = myStProc.resultSet(); | ||
Object properties: | prototype | |||
Object methods: | close(), columnName(), columns(), next() |
When you call a stored procedure in a RDMS, you don't always get back a sequence of records in the same layout and structure as when you just do a simple SQL select style query.
An SQL query would return a series of records separated by newline characters. A stored procedure might return a mixed collection of records of different types.
A ResultSet object is created by asking the Stproc object for it when the stored procedure has been called and returned from the database.
The traversing mechanisms provided with a result set allow you to move forwards through the data but you cannot move backwards. Also, you can only read values from a result set as opposed to a cursor which allows you to update it and write new values back.
<SERVER> // An example derived from Wrox Professional JavaScript database.connect("ODBC", "myDatabase", "me", "myPassword", ""); myStoredProc = database.storedProc("myProcedure", 40); myResultSet = myStoredProc.resultSet(); </SERVER>
Property | JavaScript | JScript | N | IE | Opera | NES | ECMA | DOM | CSS | HTML | Notes |
---|---|---|---|---|---|---|---|---|---|---|---|
prototype | 1.2 ![]() | ![]() | ![]() | ![]() | ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | - |
Method | JavaScript | JScript | N | IE | Opera | NES | ECMA | DOM | CSS | HTML | Notes |
---|---|---|---|---|---|---|---|---|---|---|---|
close() | 1.2 ![]() | ![]() | ![]() | ![]() | ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | - |
columnName() | 1.2 ![]() | ![]() | ![]() | ![]() | ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | - |
columns() | 1.2 ![]() | ![]() | ![]() | ![]() | ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | - |
next() | 1.2 ![]() | ![]() | ![]() | ![]() | ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | - |
Prev | Home | Next |
Restricted access | Up | ResultSet.close() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |