The Record object navigates through the file and folder structure, manipulating (copying, moving, and deleting) the files and folders.
The Record object represents like Directories and Files in the file system, and folders and messages in an e-mail system. A record can also represent a row in a RecordSet. A record has a Field collection.
By using ADO Record object to access any item in the Exchange store. we have full access to the item's set of properties and its associated stream.
For example:
Dim Rec As New ADODB.Record?
Dim Conn as New ADODB.Connection
Dim Stm as ADODB.Stream
Conn.Provider = "ExOLEDB.DataSource"
Conn.Open "http://server/folder"
Rec.Open "http://server/folder/data.txt", Conn
Set Stm = Rec.Fields(adDefaultStream).Value
'...
Conn.Close
Rec.Close
Set Conn = Nothing
Set Rec = Nothing
Structured databases could be accessed by ActiveX Data Object(ADO) in versions 2.5. In a structured database, each table has the exact same number of columns in each row, and each column is composed of same data type.
The ActiveX Data Object(ADO) Record object allows to access to data-sets where the number of columns and /or the data type can be different from row to row.
Syntax:
objectname.property
objectname.method
property:
Property
Description
ActiveConnection
Sets or returns which Connection object a Record object belongs to
Mode
Sets or returns the permission for modifying data in a Record object
ParentURL
Returns the absolute URL of the parent Record
RecordType
Returns the type of a Record object
Source
Sets or returns the src parameter of the Open method of a Record object
State
Returns the status of a Record object
Methods:
Methods
Description
Cancel
Cancels an execution of a CopyRecord, DeleteRecord, MoveRecord, or Open call
Close
Closes a Record object
CopyRecord
Copies a file or directory to another location
DeleteRecord
Deletes a file or directory
GetChildren
Returns a Recordset object where each row represents the files in the directory
MoveRecord
Moves a file or a directory to another location
Open
Opens an existing Record object or creates a new file or directory
Collections:
Collections
Description
Properties
A collection of provider-specific properties
Fields
Contains all the Field objects in the Record object
Record object's Fields Collection's Properties
Count:
Returns the number of items in the fields collection. Starts at zero.
For Example:
countfields = rec.Fields.Count
Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.