AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Administrar bases de datos / Funciones SQL
  • Managing tabulations in the items
  • Managing Float during an Oracle access via ODBC
  • Retrieving Float items on Oracle (via ODBC)
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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 CUSTNAME " + ...
"FROM INV", "QRY1")  
IF ResExec=True THEN  
SQLFirst("QRY1")  
// Transfer the name into
// LIST_NAME
WHILE NOT SQL.Out
ListAdd(LIST_NAME, ...
   SQLCol("QRY1" ,1))
SQLNext("QRY1")  
END  
ELSE  
// ProcessError  
END  
SQLClose("QRY1")
i is int = 0
SQLExec("SELECT LASTNAME, FIRSTNAME," + ...
"EXTENSION,PHOTO FROM CUSTOMER", ...
"QRY1" )  
// Retrieve the query row by row
WHILE SQLFetch("QRY1") = 0
// There is still another line  
i++  
// Retrieve the data  
LASTNAME[i] = SQLGetCol("QRY1", 1)  
FIRSTNAME[i] = SQLGetCol("QRY1", 2)
EXTENSION[i] = SQLGetCol("QRY1", 3)
{"IMAGE" +i} = ...  
SQLGetMemo("QRY1", 4)
END
SQLClose("QRY1")
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:
// Connection to the Oracle database  
SQLConnect("MyOracleDatabase", "User", "Pass", "", "ODBC")  
// Request for changing the decimal separator  
SQLExec("ALTER SESSION SET NLS_NUMERIC_CHARACTERS ='. '", "TempQry")
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local