Jump: Search:

Total Visual SourceBook

Total Visual SourceBook CD and Printed Manual

Microsoft Access 2007/2010 Version
is Shipping!

New features in Total Visual SourceBook for Access, Office 2007 and VB6

Supports Access/Office 2010 (32 bit), 2007, 2003, 2002, 2000, and
Visual Basic 6.0!

Also available for:
Access 97/95


View all FMS products for Microsoft AccessAll Our Microsoft Access Products

SourceBook Info:

Why SourceBook?

 

"The code is exactly how I would like to write code and the algorithms used are very efficient and well-documented."

Van T. Dinh, Microsoft MVP

 

 

 

 

 
Royalty free source code library modules for Microsoft Access, VB6, VBA, OfficeRoyalty free source code library modules for Microsoft Access, VB6, VBA, OfficeVBA and VB6 Source Code Library Download the free trial version of Total Visual SourceBook for Microsoft Access, Office, VB6 and VBA
Category: Database : Access/Jet
Description: Microsoft Access Jet databases and their objects (MDB and ACCDB database formats)

Class: CADOConnJet

Class to support client/server operations using ADO.

This class supports client/server operations using Microsoft's ActiveX Data Objects (ADO) technology. When using Visual Basic to deploy data-oriented local or client/server applications, you have a variety of development choices. You can use DAO and Jet, DAO and ODBC Direct, RDO and the Remote Data Control, or program directly against the ODBC API. This class exposes functionality to use ADO against Microsoft Jet data sources using the native Jet OLE DB driver. For information on the other choices, see the other classes in the Database category.

Procedure Name

Type

Description

(Declarations) Declarations Declarations and private variables for the CADOConnJet class
Attributes Property Set the connection attribute flags used to open the connection to the database. For a Connection object, the Attributes property is read/write, and its value can be the sum of any one or more of the XactAttributeEnum values (default is zero).
CommandTimeout Property Sets the value of the CommandTimeout property of the connection. Use this property to allow the cancellation of an Execute method call, due to delays from network traffic or heavy server use.
Connection Property Returns a pointer to the local Connection object that was created by this class This property is read-only. You may use this property to gain access to all of the properties and methods of the ADODB Connection object via an object variable declared from the CADOConnJet class.
ConnectionTimeout Property Sets the value of the ConnectionTimeout property of the connection. Use this property on a Connection object if delays from network traffic or heavy server use make it necessary to abandon a connection attempt.
ConnectString Property Returns the value of the ConnectString property of the connection. This property is a combination of the values supplied as properties of this class, and additional values supplied after the connection is made.
CursorLocation Property Returns the value of the CursorLocation property of the connection. This property allows you to choose between various cursor libraries accessible to the provider. Usually, you can choose between using a client-side cursor library or one that is located on the server.
DatabasePassword Property Returns the text of database-level password used to create the connection to the Jet database. Note that the DatabasePassword property is separate from the user-level password needed when using Jet security.
DataSource Property Sets the string containing the name of the server machine used to create the connection. The name may use either mapped drive letters or follow the UNC standard for referring to server and share locations.
IsolationLevel Property Returns the value of the IsolationLevel property of the connection. This property is read/write. The setting does not take effect until the next time you call the BeginTrans method. If the level of isolation you request is unavailable, the provider may return the next greater level of isolation.
JetVersion Property Returns the version number of the Jet OLE DB driver used to create the connection. Valid settings are: - acjVersion351 = Jet 3.51 - acjVersion400 = Jet 4.0 - acjVersion12 = Jet 12
Mode Property Sets the value of the Mode property of the connection. Use this property to set or return the access permissions in use by the provider on the current connection. You can set the Mode property only when the Connection object is closed.
Password Property Sets the text of the password used to log into the database. This property is used in conjunction with the UserID and SystemDB properties.
Provider Property Sets the ODBC provider name used to create the connection. This property is read/write when the connection is closed and read-only when it is open. The setting does not take effect until you either open the Connection object or access the Properties collection of the Connection object. Normally this value will not need to be changed for an OLE DB Jet connection. It is automatically set.
RegistryPath Property Sets the registry key location where Jet initialization information is stored You may set up an entry in the system registry that controls various parameters of the Jet database engine. This property indicates the location in the registry to find those settings. See the Microsoft Jet documentation for information on the values associated with the registry entry.
SystemDBName Property Returns the fully-qualified path to the Microsoft Jet workgroup security database. If the Jet database is secured with Jet security, use this property to specify the location of the workgroup system information database. This property is used in conjunction with the UserID and Password properties.
UserID Property Sets the string containing the user name used to log into the server. If the Jet database is secured with Jet security, use this property to specify the name of the user to log into the database. This property is used in conjunction with the Password and SystemDB properties.
ADOPassiveShutdown Method Uses the Jet passive shutdown technology to prevent/allow users from issuing any new attempts to open the named database.
ADOUserComputersToString Method Provide the list of connected computers in a delimited string
ADOUserCount Method Count the number of users (actually current connections) to the database. This includes at least one for the passed connection. When it is one, it means no other users are in the database
ADOUserRosterToString Method Uses the Jet User Roster to list all users in the specified database Note that a database opened on a read-only share cannot create a lockfile. The user roster against such a file does not work.
BuildConnectString Private Builds up the string used as the ConnectString property of the class, which is the value used to open the connection. The various property settings of this class are constructed into the actual ConnectString which are used to create the connection. This helper procedure handles creating the string.
Class_Initialize Initialize Set initial values to defaults which may be overridden with property settings
Class_Terminate Terminate Release resources used by the class
CloseConnection Method Closes the current connection to the ODBC database
m_Connection_BeginTransComplete Private The private local ADODB.Connection variable raises connection- related events. This proc simply passes the BeginTransComplete events on to the user of this class
m_Connection_CommitTransComplete Private The private local ADODB.Connection variable raises connection-related events. This proc simply passes the CommitTransComplete events on to the user of this class
m_Connection_ConnectComplete Private The private local ADODB.Connection variable raises connection- related events. This proc simply passes the ConnectComplete events on to the user of this class
m_Connection_Disconnect Private The private local ADODB.Connection variable raises connection- related events. This proc simply passes the Disconnect events on to the user of this class
m_Connection_ExecuteComplete Private The private local ADODB.Connection variable raises connection- related events. This proc simply passes the ExecuteComplete events on to the user of this class
m_Connection_InfoMessage Private The private local ADODB.Connection variable raises connection-related events. This proc simply passes the InfoMessage events on to the user of this class
m_Connection_RollbackTransComplete Private The private local ADODB.Connection variable raises connection-related events. This proc simply passes the RollbackTransComplete events on to the user of this class.
m_Connection_WillConnect Private The private local ADODB.Connection variable raises connection-related events. This proc simply passes the WillConnect events on to the user of this class
m_Connection_WillExecute Private The private local ADODB.Connection variable raises connection-related events. This proc simply passes the WillExecute events on to the user of this class.
OpenConnection Method Opens the ADODB Connection to the specified database, using the properties of this class to control parameters of the connection. After this method successfully completes, the connection is live and you can issue commands against it and process the results.
OpenDatabase Method Opens an ADODB Connection to the specified database without setting all the options (useful for non-password protected databases)
TrimNulls Private Returns the passed string terminated at the first null

Overview of Total Visual SourceBook

The source code in Total Visual SourceBook includes modules and classes for Microsoft Access, Visual Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily add this professionally written, tested, and documented royalty-free code into your applications to simplify your application development efforts.

Additional Resources

Feedback

Contact Us  l   Web questions: Webmaster   l   Copyright © FMS, Inc., Vienna, Virginia
Celebrating our 26th Year of Software Excellence