FoxDataObjects

Object-Relational Mapping Tool for Visual FoxPro®

 ConnectionMode   Property

 

 

Specifies how connections to database are managed.

 Session.ConnectionMode [=nValue]

 

Property Values

 

nValue

 
  The settings for the ConnectionMode property are:
Setting Description
0 CONNECTIONMODE_MANUAL
1 CONNECTIONMODE_AUTOMATIC

Remarks

  This property specifies how the session object manages connections to the database.

When this property is set to 0 (CONNECTIONMODE_MANUAL), a connection to the database must be established by using the Session.Connect method in your code. A connection to the database can be closed using the Session.Disconnect (See also Session.ConnectionLifeTime property).

When this property is set to 1 (CONNECTIONMODE_AUTOMATIC), connections and disconnections to/from the database are managed by the persistence engine. Whenever a persistence service requires access to the database, if there is no connection stablished, the persistence engine will try to connect using the Session.Datasource object set either by the Server.NewSession method or by code. The Session.ConnectionLifeTime property specifies how long a connection to the database must be kept open when there is no database activity.

 

See Also

Server.NewSession method | Session.Connect method | Session.ConnectionLifeTime property | Session.Disconnect method

Applies to: Session object

Send feedback on this topic to RunAhead Technologies

For Technical support and product issues please contact us at support@foxdataobjects.com or visit http://www.foxdataobjects.com

Copyright (c) 2000-2005 RunAhead Technologies