Share via


Offline Switch Foundation Class

Category Data Editing
Default Catalog Visual FoxPro Catalog\Foundation Classes\Data Query
Class _offline
Base Class Container
Class Library _dataquery.vcx
Parent Class container

Remarks

The Offline switch works in a database containing remote views. This class provides a set of buttons that toggle between use of online and offline data.

To use, drop the class on a project or form in a data environment or, from the Component Gallery Item Shortcut Menu, select Add to Project or Add to Form. When you add the class to a form, Visual FoxPro places the class buttons on the form, and opens a builder so you can specify lUseCurrentDBC, lAllViews, lUpdateViews, and lRevertOnFail values. When you drop the class on a project, you can choose between adding the class or creating a subclass.

See Guidelines for Using Visual FoxPro Foundation Classes for more information on using foundation classes.

Properties, Events, Methods Description
cDatabase property Specifies the name of the database
containing views to take offline.
Default: .F.
cViews[1,0] property Specifies the array of views to process.
Default: .F.
lAllViews property Specifies whether to automatically use all
views in the database.
Default: .F.
lRevertOnFail property Secifies whether to revert all views if
one fails when going offline.
Default: .T.
lUpdateViews property Specifies whether to update all views
when going online.
Default: .T.
lUseCurrentDBC property Specifies whether to use the currently
opened database at the start.
Default: .T.
GoOffLine method Takes the views specified in the cViews
array offline.
Syntax: GoOffline( )
Return: none
Arguments: none
GoOnLine method Takes the views specified in the cViews
array online.
Syntax: GoOnline( )
Return: none
Arguments: none
CheckOffLine method Checks to see if views are currently online/offline.
Syntax: CheckOffline( )
Return: none
Arguments: none
Alert method Displays a message box containing
cMessage.
Syntax: Alert(cMessage)
Return: m.cMessage
Arguments:
cMessage specifies the text of the alert
message.

See Also

Guidelines for Using Visual FoxPro Foundation Classes | Visual FoxPro Foundation Classes A-Z | Visual FoxPro Foundation Class Samples