次の方法で共有


Session Object

Creates a custom, user-defined object that manages its own data session.

DEFINE CLASS ClassName1 AS Session

Remarks

You can create this custom, user-defined class only using the DEFINE CLASS command. You can, however, add this object to a form or other container programmatically.

Custom, user-defined classes are classes with properties, events, and methods, but with no visual representation. The same general rules that apply to defining other types of classes apply to defining custom classes. Use the Session object as efficient memory management and to ensure safe behavior of multiple object instances in multi-tiered applications.

See Object-Oriented Programming for additional information about creating custom objects as non-visual classes.

In this version of Visual FoxPro, the default values for SAFETY, EXCLUSIVE, and TALK are changed from those in the previous version of Visual FoxPro to the following:

Setting Value
EXCLUSIVE OFF
SAFETY OFF
TALK OFF

When the Session object represents a COM Server, all intrinsic properties are treated as private.

See Also

Session Object Properties, Methods and Events | DEFINE CLASS | Object-Oriented Programming | Adding User-Defined Objects to a Form | Commands that Scope to a Data Session