ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Example: Executing and deleting a view
HDeleteView (Example)
Example: Executing and deleting a view
This example Is used to create a view and to delete it when the necessary processes have been performed.
// View on CUSTOMER file, with all the file items
// 1st item of the view as sort item
// Use the Replace() function if the string contains quotes (')
// Because the quotes in the strings must be prefixed by a backslash (\)
ResView is boolean
MyView is Data Source
ResView = HCreateView(MyView, "CUSTOMER", "", "", "COMPANY='" + Replace(CompanyName, "'", "\'") + "'")
IF ResView = 0 THEN
Error("Error while creating the view",...
  "Error #" + HError() + ", internal #:" + HError(hSubErrFirst)
ELSE
// Process on the view
...
HDeleteView(MyView)
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help