Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
SQL.FetchLast
Fetches the last row from a result set.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| SQL | 2.6 | Yes | Yes | Yes | Yes | Yes |
MBS( "SQL.FetchLast"; Command ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| Command | The command reference number gained with SQL.NewCommand. | $Command |
Result
Returns 0, 1 or error message.
Description
Fetches the last row from a result set.Use SQL.FetchPrior, SQL.FetchFirst, SQL.FetchLast method to fetch rows from the scrollable result set. The scrollable result set option should be set before Command executed (SQLite and InterBase don't support this feature). See server specific notes to discover how SQLAPI++ supports the scrollable result set for cetain DBMS.
To check whether a result set exists use SQL.isResultSet method.
Scrolling only works if enabled, so please call SQL.SetCommandOption function to enable it if needed.
Result is 1 on success or 0 on failure.
Examples
Fetch last record:
MBS("SQL.FetchLast"; $Command)
Requests a scrollable record set:
MBS( "SQL.SetCommandOption"; $Command; "Scrollable"; "True" )
See also
- SQL.FetchFirst
- SQL.FetchNext
- SQL.FetchPos
- SQL.FetchPrior
- SQL.isResultSet
- SQL.NewCommand
- SQL.SetCommandOption
Created 18th August 2014, last changed 24th April 2016
SQL.FetchFirst - SQL.FetchNext
Feedback: Report problem or ask question.
Links
MBS Xojo PDF Plugins