PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Example: Merging views
HMergeView (Example)
Example: Merging views
WEBDEV - Server codeAjaxHFSQLHFSQL Client/ServerHyper File 5.5OLE DBNative Connectors (Native Accesses) Two views are created to select players from 2 different clubs. These views are merged into a final view that will be browsed.
EXTERN MyView1, MyView2, MyView_Finale
// Create the view named "MyView1"
IF HCreateView("MyView1", Club_Liverpool, "Player_Name", ...
"", "Player_Name > '" + Variable1 + "'", hViewDefault) = False THEN
Error(HErrorInfo())
END

// Create the view named "MyView2"
IF HCreateView("MyView2", Club_Chelsea, "Player_Name", "", ...
"Player_Name > '" + Variable2 + "'", hViewDefault) = False THEN
Error(HErrorInfo())
END

// Merge the 2 views into the final view named "MyView_Final"
IF HMergeView("MyView_Final", "MyView1", "MyView2", ...
hViewUnion, "Player_Name", "Player_Name" = False THEN
Error(HErrorInfo())
END

// Browse the view
HReadFirst("MyView_Final")
WHILE HOut() = False
// Process to perform
HReadNext("MyView_Final")
END

// Destroy the views
HDeleteView(MyView1)
HDeleteView(MyView2)
HDeleteView(MyView_Final)
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment