Compartir a través de


How to: Display View Structure

You can display the structure of a view without opening the View Designer. . This option is useful when you want to look at the structure of a remote view without waiting to download data.

To display a view without data

  1. Open the view with the USE command and the NODATA keyword.

  2. Use the DISPLAY STRUCTURE command to display the structure information for the view in the main Visual FoxPro window.

For more information, see USE Command.

Tip

Using the NODATA keyword is the fastest way to retrieve the structure for a view because it creates the smallest cursor possible on the remote data source.

For example, the following code opens a database named MyDatabase. The USE command opens a previously created remote view called Customer_Remote_View with the NODATA keyword in the work area 0. The DISPLAY STRUCTURE command writes the structure information to a file called ViewStructure without sending it to the main Visual FoxPro window.

OPEN DATABASE MyDatabase
USE Customer_Remote_View NODATA IN 0
DISPLAY STRUCTURE TO FILE ViewStructure.txt NOCONSOLE

See Also

Other Resources

Displaying Data in Views

Managing Views

Working with Views (Visual FoxPro)