PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Loading the query in memory
  • Partial Fetch
  • Various
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Positions on the first line of query result. This line becomes the current line.
If controls or variables are associated with the columns of query result (SQLAssociate), the values found in the current row are automatically assigned to these elements.
In most cases, SQLFirst is used in a read loop with SQLNext.
Caution: This function must be used during a SQLFirst/SQLCol browse of query result. See Types of SQL browse for more details.
Java The partial fetch is automatically performed by the Java framework.
Versions 19 and later
Android Widget This function is now available in Android Widget mode (accessing the external databases via a Webservice).
Android This function is now available for the Android applications (accessing the external databases via a Webservice).
iPhone/iPad This function is now available for the iPhone/iPad applications (accessing the external databases via a Webservice).
New in version 19
Android Widget This function is now available in Android Widget mode (accessing the external databases via a Webservice).
Android This function is now available for the Android applications (accessing the external databases via a Webservice).
iPhone/iPad This function is now available for the iPhone/iPad applications (accessing the external databases via a Webservice).
Android Widget This function is now available in Android Widget mode (accessing the external databases via a Webservice).
Android This function is now available for the Android applications (accessing the external databases via a Webservice).
iPhone/iPad This function is now available for the iPhone/iPad applications (accessing the external databases via a Webservice).
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
// Initialize the scrollbar parameters at the end of query
ResSQL = SQLExec("SELECT CUSTLASTNAME, FIRSTNAME, ADDR1, ADDR2, CITY, ZIP FROM CUSTOMER", ...
"QRY1")
IF ResSQL = True THEN
// Displays the first line
SQLFirst("QRY1")
// Initializes the upper bound of the scrollbar
SCROLL_SCROLL1..MaxValue = SQL.NbLine
// Positions the scrollbar at the beginning
SCROLL_SCROLL1 = 1
ELSE
// Processes the error
END
SQLClose("QRY1")
Syntax
SQLFirst([<Number of Lines>] , <Query Name>)
<Number of Lines>: Optional integer
Number of lines that will be loaded in memory every second. This number of lines will constitute a block for the partial Fetch.
Parameter required to perform a read by partial Fetch.
Java This parameter is ignored. Indeed, the partial Fetch is automatically performed by the Java framework.
<Query Name>: Character string (with or without quotes)
Query Name:
Java The queries created in the query editor must be specified in the format of a character string with quotes.
Remarks

Loading the query in memory

If SQLFirst is immediately called after SQLExec, the query result is loaded in memory. Two methods are available:
  • Entirely load the query in memory if <Number of Lines> is not specified. The number of records corresponding to the query result is automatically calculated. The SQL.NbLine variable is updated.
  • Partially load the query in memory (also called partial fetch) if <Number of Lines> is specified.
    Only the first block of lines is loaded in memory. The following blocks are automatically loaded in background task (mechanism of partial fetch). The SQL.Retrieving variable (updated by SQLInfo) is used to find out whether the result was entirely retrieved.
    Note: Depending on the process performed, the partial fetch is used to reduce the network bandwidth.
Java The partial fetch is automatically performed by the Java framework. The SQL.Retrieving variable is never initialized and it always returns False.
WINDEVWEBDEV - Server codeReports and QueriesWindowsPHPAjaxUser code (UMC)HFSQLHFSQL Client/ServerHyper File 5.5OLE DBODBCNative Accesses

Partial Fetch

If you are using the Partial Fetch to retrieve the query result (see the example for this function):
  • If SQLClose is called while the retrieval is not completed, the retrieval is stopped and the query is closed.
  • This method can be used with several queries at the same time.
  • The SQL.Retrieving variable (updated by SQLInfo) is used to find out whether the result was entirely retrieved.

Various

  • If the pointer is positioned outside the query result, the SQL.Out variable is set to True.
  • The SQL.Current variable contains the number of the current line.
  • SQLTable must not be used after SQLFirst. A fatal error is generated.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230hf.dll
Java wd230java.jar
Linux wd230hf.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment