Server_EOT() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Determines whether the end of the result table has been reached via a Server Fetch statement. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

Server_EOT( StatementNumber )

StatementNumber is the number of the Server Fetch statement you are checking.

Return Value

Logical

Description

The Server_EOT() function returns TRUE or FALSE indicating whether the previous Server Fetch statement encountered a condition where there was no more data to return. Attempting to fetch a previous record immediately after fetching the first record causes this to return TRUE. Attempting to fetch the next record after the last record also returns a value of TRUE.

Example

Dim hdbc, hstmt As Integer
hdbc = Server_Connect("ODBC", "DLG=1")
hstmt = Server_Execute(hdbc, "Select * from ADDR")
Server hstmt Fetch FIRST
While Not Server_EOT(hstmt)
	' Processing for each row of data ...
	Server hstmt Fetch Next
Wend

See Also:

Server Fetch statement