ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / SQL functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Positions on the previous row of the query result. This row becomes the current row.
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, SQLPrevious is used in a read loop with SQLLast.
Caution: This function must be used during an SQLFirst/SQLCol browse of query result. For more details, see Types of SQL browse.
Example
ResExec = SQLExec("SELECT CUSTNAME FROM INVOICE", "QRY1")
IF ResExec THEN
// Transfer the name into LIST_NAMELIST
SQLLast("QRY1")
WHILE NOT SQL.Out
ListAdd(LIST_NAMELIST, SQLCol("QRY1", 1))
SQLPrevious("QRY1")
END
ELSE
// Processes the error
END
SQLClose("QRY1")
Syntax
SQLPrevious(<Query name>)
<Query name>: Character string
Query name:
Java The queries created with the query editor must be specified in the format of a character string.
Remarks
  • If the pointer is located outside the query file, the SQL.Out variable is set to True.
  • The SQL.Current variable contains the number of the current line.
Component: wd290hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help