ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / SQL functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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.
Warning This function must be used when browsing the result of a SQLFirst/SQLCol query. For more details, see Types of SQL browse.
Example
ResExec = SQLExec("SELECT NOMCLI FROM FACT", "REQ1")
IF ResExec THEN
	// Transfert du nom dans LISTE_LISTENOM
	SQLLast("REQ1")
	WHILE NOT SQL.Out
		ListAdd(LISTE_LISTENOM, SQLCol("REQ1", 1))
		SQLPrevious("REQ1")
	END
ELSE
	// Traite l'erreur
END
SQLClose("REQ1")
Syntax
SQLPrevious(<Query name>)
<Query name>: Character string
Name of the query:
Remarks
  • If the pointer is located outside the query file, the SQL.Out variable is set to True.
  • The Variable SQL.Current variable contains the current line number.
Component: wd300hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help