Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
Result - Database Result Module
The Result Module
The Result module represents a table that results from an SQL query.
The Result module maintains a cursor in the table that indicates a single row. Operations that manipulate data always work on this row. The following commands move the cursor: Next, Previous, First, Last, and GotoRow.
A new Result object has the cursor on a row previous to the first row with data (the "before first" row). Therefore, it is necessary to call Next before accessing data the first time. This is convenient for writing while loops that loop over the data in the Result.
Some JDBC drivers do not support scrollable result sets. This means when inspecting the rows of a Result only Next will work. Once the last row has been read, the Result module should be considered closed and no longer used. For more information, see the compatibility help page.
A Result object can also be used to update a database (assuming the JDBC driver and database support this, see compatibility). A row can be deleted using the DeleteRow command. Data in a row can be updated with UpdateData and UpdateRow. A new row can be inserted by calling InsertRow.
A Result can be converted into a Maple data type by calling ToMaple. This converts a Result into a table or an Array. It can also display the Result data in a Maplet application.
For more information on using Database, see usage.
A Result Module's Exported Commands
Close
DeleteRow
First
GetColumnCount
GetData
GetName
GetOptions
GetRowCount
GetRowIndex
GetType
GotoRow
InsertRow
Last
Next
Previous
SetOptions
ToMaple
UpdateData
UpdateRow
See Also
Database, Database[Connection][ExecuteQuery], Database[Statement][Execute], Database[Statement][NextResult], Database[usage]
Download Help Document