PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Example: Initializing and browsing a SQL query
  • Example: Connecting to a SQL Server database and running a query
HExecuteSQLQuery (Example)
Example: Initializing and browsing a SQL query
Windows MobileHFSQLHFSQL Client/ServerNative Connectors (Native Accesses) The following example is used to initialize a query and to browse it. This example is using the Data Source type to handle the query.
MyQuery is Data Source
// Initializes the query
IF NOT HExecuteSQLQuery(MyQuery, ...
"SELECT LASTNAME,FIRSTNAME FROM CUSTOMER WHERE CUSTOMER.LASTNAME = 'SMITH'") THEN
Error("Error while initializing the query" + CR + HErrorInfo())
RETURN
END
 
// Read the first record of the query
HReadFirst(MyQuery)
WHILE NOT HOut()
  // Process on the query record
  // Access to the items via MyQuery.<Item Name>
  ...
  // Read the next record
  HReadNext()
END
Example: Connecting to a SQL Server database and running a query
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment