PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Managing tabulations in the items
  • Managing Float during an Oracle access via ODBC
  • Retrieving Float items on Oracle (via ODBC)
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
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 browse: SQLFirst/SQLCol
Type of browse: 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")
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment