PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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.
See the help about SQLCol and SQLAssociate for more details.
This type of browse can be used to retrieve the tabulations found in the values of records.
See the help about SQLGetCol for more details.
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 line by line
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")
See Types of SQL browse for more details.
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 required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment