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
  • Managing tabulations in the items
  • Managing Float during an Oracle access via ODBC
  • Retrieving Float items on Oracle (via ODBC)
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Managing tabulations in the items
Depending on the type of browse implemented with the SQL functions, the management of the tabulations in the items will differ:
Type of path: SQLFirst/SQLCol
Type of path: SQLFetch/SQLGetCol
Management of tabulationsThis type of browse cannot be used to retrieve the tabulations found in the values of records. A tabulation separates two items. Only the part found before the tabulation will be retrieved by the read functions.
For more details, see the help about SQLCol and SQLAssociate.
This type of browse can be used to retrieve the tabulations found in the values of records.
For more details, see the help about SQLGetCol.
Example
ResExec = SQLExec("SELECT NOMCLI " + ...
	"FROM FACT", "REQ1")  
IF ResExec=True THEN  
	SQLFirst("REQ1")  
	// Transfert du nom dans 
	// LISTE_NOM
	WHILE NOT SQL.Out
		ListAdd(LISTE_NOM, ...
		   SQLCol("REQ1" ,1))
		SQLNext("REQ1")  
	END  
ELSE  
	// TraiteErreur  
END  
SQLClose("REQ1")
i is int = 0 
SQLExec("SELECT NOM, PRENOM," + ... 
	"POSTE,PHOTO FROM CLIENT", ... 
	"REQ1" )  
// Récupérer la requête ligne à ligne
WHILE SQLFetch("REQ1") = 0 
	// Il y a encore une ligne  
	i++  
	// Récupérer les données  
	NOM[i] = SQLGetCol("REQ1", 1)  
	PRENOM[i] = SQLGetCol("REQ1", 2)
	POSTE[i] = SQLGetCol("REQ1", 3)
	{"IMAGE" +i} = ...  
		SQLGetMemo("REQ1", 4) 
END
SQLClose("REQ1")
For more details, see Types of SQL browse.
Managing Float during an Oracle access via ODBC

Retrieving Float items on Oracle (via ODBC)

By default, the decimal separator used for the Float items on Oracle is the dot. However, the ODBC driver returns the value by using the comma as decimal separator. The decimal places are lost when the value is assigned to a numeric control.
To avoid this problem, you must configure the decimal separator for the current connection:
// Connexion à la base de données Oracle  
SQLConnect("MaBaseOracle", "User", "Passe", "", "ODBC")  
// Requête pour changer le séparateur décimal  
SQLExec("ALTER SESSION SET NLS_NUMERIC_CHARACTERS ='. '", "ReqTemp")
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