You are currently offline, waiting for your internet to reconnect

How to Open a Database or Table in Visual FoxPro

This article was previously published under Q130129
SUMMARY
In Visual FoxPro, you can use the user interface or command methods to opendatabases and tables. There are two types of tables - those containedwithin a database and those that are free tables independent of a database.

If you attempt to open a table that is part of a database without thedatabase open, Visual FoxPro opens the database for you.
MORE INFORMATION

Opening Databases

To open a database through the user interface in Visual FoxPro, chooseOpen from the File menu or click the Open file icon on the main VisualFoxPro toolbar. When the Open dialog box appears, select Database(*.DBC) from Files of Type popup. To use the database, double-click it, orselect it, and click OK.

To open a database by command, use the OPEN DATABASE command. Thiscommand allows you to open a database from the Command window or duringprogram execution. There are several options that the OPEN DATABASE commandcan accept. The following examples show how to open a database with theOPEN DATABASE command:
   OPEN DATABASE ?   OPEN DATA TASTRADE.DBC EXCL   OPEN DATA SAMPLE.DBC SHARED				
For More information on the OPEN DATABASE command, consult the VisualFoxPro "Language Reference" Manual or type HELP OPEN DATABASE in the VisualFoxPro Command window.

Opening Tables

To open a table through the user interface in Visual FoxPro, choose Openfrom the File menu, or click the Open file icon on the main Visual FoxProtoolbar. When the Open dialog box appears, select Table (*.DBF) from Filesof Type popup. To use the table, double-click it, or select it, and clickOK.

To open a table by command, use the USE command. This command allows you toopen a table from the Command window or during program execution. There areseveral options that the USE command can accept. The following examplesshow how to open a table with the OPEN DATABASE command:
      USE ?      USE TASTRADE.DBF EXCL      USE C:\VFP\DATA\SAMPLE.DBF SHARED				
For More information on the USE command, consult the Visual FoxPro"Language Reference" Manual or type HELP USE in the Visual FoxPro Commandwindow.
VFoxWin
Properties

Article ID: 130129 - Last Review: 02/09/2000 12:28:00 - Revision: 1.1

  • Microsoft Visual FoxPro 3.0 Standard Edition
  • KB130129
Feedback