Click or drag to resize

DataWindow.Use Method

X#
Connect the data window to a data server in a client-server relationship.

Namespace:  VO
Assembly:  VOGUIClasses (in VOGUIClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD Use(
	oDataServer
) AS USUAL CLIPPER
Request Example View Source

Parameters

oDataServer (Optional)
Type: Usual
The DataServer object that the window is to be connected to. If the window is already connected to a server, it is disconnected first. If the server argument is omitted, the server is not connected to any window.

Return Value

Type: Usual
TRUE if the connection was successful; otherwise, FALSE. The operation fails under the following conditions: if the window has controls and columns but none matches the names of the fields of the server and, of course, if there is a technical problem with the server.
Remarks
The Use() method connects controls and browser columns with fields of the data server based on matching names. Any control that does not have an explicitly provided field specification and hyperlabel inherits the field specification and hyperlabel from its data server field. If the window does not have any controls or columns, the Use() method automatically creates a layout with controls or columns for all the fields in the server. A layout is created for each view—data window and browse—only when it is needed. Use() also registers the window as a client of the server with the DataServer:RegisterClient() method.
See Also