AbsolutePage properties
Specifies the page where the current record is located.
Setting and return value
Set or returns a long integer value of the number of pages contained from 1 to RecordSet object, or return the following constant.
Constant Description AdposunkNownRecordset is empty, the current location is unknown, or the provider does not support the AbsolutePage property. The current record pointer is located in the BOF (ie, the BOF property is true). The current record pointer is located in EOF (ie the EOF property is TRUE).
Description
Use the ABSOLUTEPAGE attribute to identify the page number where the current record is located. Use the PageSize property to divide the RecordSet object logic into a series of pages, the number of records per page is equal to PageSize (except the last page, the number of records is less). The provider must support the corresponding functionality of this property to use this property.
Like the AbsolutePosition property, AbsolutePage starts from 1 and is equal to 1 when the first record is currently recorded as the RECORDSET. Set this property to move to the first record of a specific page. The total number of pages can be obtained from the PageCount property.
AbsolutePosition Attribute
Specifies the number of serial number where the Recordset object is currently recorded.
Setting and return value
Set or returns a long integer value of the number of pages contained from 1 to RecordSet object, or return the following constant.
Constant Description AdposunkNownRecordset is empty, the current location is unknown, or the provider does not support the AbsolutePage property. The current record pointer is located in the BOF (ie the BOF property is true.) Adposeof Current Record Pointer is located in EOF (ie the EOF property is TRUE.)
Description
Using the AbsolutePosition property can be moved to the record according to the serial number position in the Recordset, or determine the currently recorded sequence number position. The provider must support the corresponding functionality of this property to use this property.
Like the ABSOLUTEPAGE attribute, AbsolutePosition starts from 1 and is equal to 1 when the first record is currently recorded as the RECORDSET. The total number of records of the Recordset object is available from the RecordCount property.
When setting the absolutePosition attribute, even if the property points to the record located in the current cache, the ADO will use the new record group that starts with the specified recording to reload the cache. The cachesize property determines the size of the record group.
Note You cannot use the AbsolutePosition property as an alternative record number. When you delete the previous record, the current location of the given record will change. If the Recordset object is retroiled or reopened, the given record has the same ABSOLUTEPSITION. The bookmark is still a recommended way to keep and return to a given position, and is the only way to locate all types of Recordset objects.
ActiveCommand properties
Indicates the Command object for creating associated Recordset objects.
return value
Returns a variant type containing the Command object. The default is a NULL object reference.
Description
The ActiveCommand property is read-only.
If you do not use the Command object to create a current RECORDSET, a NULL object reference will be returned.
If you only have the results RECORDSET object, you can use this property to find the associated Command object.
ActiveConnection property
Indicates the CONNECTION object to which the specified Command or Recordset object is currently belong.
Setting and return value
Set or returns a string containing the definition connection or Connection object. By default, NULL object is referenced. Description
Use the ActiveConnection property to determine the Connection object that will execute the specified command object or open the specified Recordset.
command
For the Command object, the ActiveConnection property is read / written.
Attempting to call the COMMAND object will generate an error before setting the property to the Connection object or a valid connection string.
Microsoft Visual Basic Set the ActiveConnection property to Nothing enables the Command object to disengage the current Connection and enable the provider to release all associated resources on the data source. The Command object can then be associated with the same Connection object or other Connection object. Some providers allow setting this property to another CONNECTION, without having to set this property to Nothing.
If the Parameter collection of the Command object contains the parameters provided by the provider, if the ActiveConnection property is set to Nothing or set to another Connection object, the collection will be cleared. If you manually create a parameter object and use these parameters to populate the Parameters collection of the Command object, set the ActiveConnection property to Nothing or other Connection objects that will not affect the Parameters collection.
Close the Connection object associated with the Command object will set the ActiveConnection property to Nothing. Set this property to a closed Connection object will generate an error.
Recordset
The ActiveConnection property is read-only for Recordset objects that open Recordset objects or their source properties are set to a valid Command object. Otherwise, this property is read / written.
This property can be set to a valid Connection object, or set to a valid connection string. At this time, the provider can use this definition to create a new Connection object and open the connection. Additionally, the provider can set this property to a new Connection object to provide you with a Connection object that accesses the extended error message or performs other commands.
If the ActiveConnection parameter using the Open method opens the Recordset object, the ActiveConnection property will inherit the value of this parameter.
If you set the Source property of the Recordset object to a valid Command object variable, the Recordset's ActiveConnection property will inherit the setting of the ActiveConnection property of the Command object.
Remote Data Services When you are used on the client (Ador) Recordset object, you can only set this property to a connection string or (Microsoft Visual Basic or VBScript) Nothing
The ActualSize property indicates the actual length of the value of the field. Setting and return value returns a long integer value. Some providers allow setting this property to reserve space for BLOB data, in which case the default value is 0. Note The actual length of the Field object value can be returned using the actualsize property. For all fields, the actualsize property is read-only. If the ADO cannot determine the actual length of the Field object value, the actsize property will return ADUNKNOWN. As shown in the following example, the actualsize and definedsize attributes are different: the AdvarChar declaration type and the maximum length of 50 characters will return to 50 definedSize property values, but the return attribute value is stored in the current recorded field. The length of the data. Attributes property indicates one or more features of the object. Settings and returns values settings or returns a long integer value. For the Connection object, the Attributes property is read / write, and its value may be the sum of any one or more xactattributeEnum values (default zero). Constant Description AdxactCommitRetaining Performs a reservation submission, which is automatically invoked to start a new transaction in COMMITTRANS. Not all providers support this constant. ADXACTABORTRETAING performs the abortment of the reserved, that is, starting a new transaction by automatically calling RollbackTrans. Not all providers support this constant. For Parameter objects, Attributes properties are read / write, and their value may be the sum of any one or more parameterattributesenum values.
Constant illustrates the ADPARAMSigned default. Indicates that the parameter accepts the value of the symbol. ADParamnullable Indicates that the parameter accepts NULL values. ADPARAMLONG indicates that the parameter accepts long binary data. For Field objects, Attributes properties are read-only, and their value may be the sum of any one or more FieldAttributeEnum values.
Constant Description The AdfldMaydefer indicates that the field is delayed, that is, since the data source that has the entire record is retrieved, only the search is only retrieved when explicitly accessed these fields. AdfldupDATABLE indicates that you can write to this field. The AdfldunkNownUpDATABLE indicates that the provider cannot determine if it can be written. AdfldFixed Indicates that the field contains a fixed length data. Adfldisnullable Indicates that the field accepts the NULL value. The AdfldMayBenull indicates that the NULL value can be read from this field. Adfldlong Indicates that the field is a long binary field. And indicate that the appendchunk and getchunk methods can be used. The AdfldRowID indicates that the field contains a persistent row identifier, which cannot be written and there is no meaningful value except for the logo (such as record number, unique identifier, etc.). AdfldrowVersion Indicates that the field contains some time or date tag for tracking updates. AdfldCachedeferred indicates that the provider caches the field value and has completed the readings of the cache. For the Property object, the Attributes property is read-only and may be any of the following or more of the PropertyAttributeSenum value:
Constant Description AdpropNotSupported Indicates that the provider does not support this property. AdpropRequired indicates that the user must specify the value of this property before the data source initialization. Adpropoptional indicates that the user does not have to specify a value for this property before the data source initialization. Adpropread indicates that the user can read this property. AdpropWrite Indicates that the user can set this property. Note Use attributes properties to set or return the Connection object, Paramete object, Field object, or property object. When multiple properties are set, the corresponding constant can be added. If the property value is set to include the sum of the incompatible constant, an error will occur. Remote Data Services This property is ineffective on the client's Connection object. BOF, EOF Attribute BOF indicates the first record of the current recording location in the Recordset object. EOF indicates that the current recording location is after the last record of the Recordset object. Return Value BOF and EOF Attributes Returns the Boolean value. Description Use the BOF and EOF attributes to determine if the RecordSet object contains records, or does it exceed the restriction of the Recordset object when moving from one record to another record. If the current record is before the first record, the BOF property will return true (-1) if the current record is the first record or after it is later, will return false (0). If the EOF attribute will return True after the last record of the Recordset object, the last record of the Recordset object is currently recorded, will return FALSE. If the BOF or EOF property is TRUE, there is no current record. If you open the recorded RecordSet object, the BOF and EOF properties will be set to True, and the RecordCount property of the Recordset object is set to zero. When the Recordset object containing at least one record is opened, the first record is the current record, and the BOF and EOF attribute are false. If the last record reserved in the Recordset object, the BOF and EOF properties will remain false until the current record is rearranged. The following table illustrates the Move method allowed by different BOF and EOF attributes.
MoveFirst, MoveLastMovePrevious, Move <0Move 0MoveNext, Move> 0BOF = True, EOF = False allow Error allow BOF = False, EOF = True Allowed Allowed Error simultaneously True Error Error Error Error while to False Allowed Allowed Allowed Allowed Allowed the Move The method does not guarantee that the method successfully positions the record, but means that the specified MOVE method does not generate errors. The following table describes what happens when the various MOVE methods but not successfully locate the record.
BOFEOFMOVEFIRST, MOVELAST Setting to True Set to True Move 0 No change MoveNext, Move <0 Set to true No change MoveNext, Move> 0 No change Set to true bookmark properties Returns the bookmark for the unique identifier of the RecordSet object, or will The current record of the Recordset object is set to records identified by a valid bookmark. Setting and return value settings or returns a variant-type expression that calculates a valid bookmark. Description Use the Bookmark property to save the current recorded position and return to the record at any time. Bookmarks can only be used in Recordset objects that support bookmark functions. When you open the Recordset object, each record has a unique bookmark. To save the current recorded bookmark, assign the value of the Bookmark property to a variable. When moving to other records, return to the record quickly, set the BookMark property of the Recordset object to the value of the variable. The user may not be able to view the value of the bookmark, and it is also not possible to compare the bookmark (pointing to the two bookmarks of the same record). If you use a Clone method to create a copy of the Recordset, the original and replicated RecordSet object bookmark property settings are the same and can be replaced. However, the bookmarks of different RecordSet objects cannot be replaced, even if these bookmarks are created by the same data source or command. The Bookmark property is always valid when the remote data service is used on the client (Ador) Recordset object. The Cachesize property indicates the number of records of the Recordset object in the local memory. Setting and return value setting or returning a long integer value greater than 0. The default is 1. Note Use the Cachesize property to control the number of records saved in the cache, and control the number of recovery to local memory once. For example, if the cachesize is 10, after the Recordset object is opened for the first time, the provider tested the previous 10 records into local memory. When moving in the Recordset object, the provider returns data in the local memory buffer; once the movement exceeds the last record in the cache, the provider returns the subsequent 10 records in the data source to the cache. The value of this property can be adjusted at the save versus of the Recordset object, but change this value only affects the number of records that are then tupled from the data source. Only change the attribute value will not change the current content in the cache. If the record to be retrieved is less than if cachesize specified, the provider will return the rest of the record without errors. Do not allow Cachesize to zero, otherwise the error will be returned. Records from cache recovery do not reflect changes made by other users at the same time. To update all cache data for actions, use the Resync method. The CommandText property contains the text to be sent according to the provider. Setting and return value settings or returns a string value that contains a provider command (such as a SOL statement, table name, or stored process call). The default is "" (zero length string). Description Use the CommandText property to set or return the text of the Command object. Typically, this property is a SQL statement, but it can also be any other type of command statement (such as a stored process call) that the provider recognizes. The SQL statement must be a specific syntax or version that the provider queries support support. If you set a CommandText property, set the Prepared property of the Command object to True and bind the Command object to the open connection, then the Ado will prepare in query when calling the Execute or Open method (ie, the provider saves the compiled query format) .
Depending on the setting of the CommandType property, ADO may change the CommandText property. Read the CommandText property at any time View the actual command text that ADO will use during execution. The CommandTimeOut property indicates that the time you need to wait during the time you have an error before you have an error. Setting and return value settings or returns a long integer value, which indicates the time (in seconds) waiting for the command. The default is 30. Description Use the CommandTimeout property on the Connection object or Command, allows the Execute method call to be canceled due to the delay generated by the network congestion or server load. If the command is not completed in the time interval set in the CommandTimeout property, an error will occur, then the ADO will cancel the command. If the property is set to zero, the ADO will wait indefinitely until the command is executed. Make sure that the provider and data source being written into the code supports the CommandTimeout function. The CommandTimeout setting of the Connection object does not affect the CommandTimeout setting of the Command object on the same connection, that is, the CommandTimeout property of the Command object does not inherit the value of the CommandTimeout of the Connection object. On the Connection object, the CommandTimeout property will remain read / write after opening the Connection. The CommandType property indicates the type of the Command object. Setting and return value settings or returns a certain commandtypeenum value.
Constant Description AdcmdText Calculates CommandText as a textual definition called by command or stored procedure. Adcmdtable calculates CommandText as the name of the table returned by the entire SQL query by the internally generated SQL query. AdcmdTableDirect calculates CommandText as the name of the table returned by the column. ADCMDSTOREDPROC calculates CommandText as a stored procedure name. Adcmdunknown defaults. The command type in the CommandText property is unknown. AdcmdFile calculates CommandText as a lasting RECORDSET file name. Adexecutenorecords indicates that CommandText is a command or stored procedure that does not return row (for example, a command to insert data). If you retrieve any line, you will drop these rows and don't return. It is always combined with AdcmdText or AdcmdStoredProc. Description Use the CommandType property to optimize the calculation of the CommandText property. If the value of the CommandType property is equal to ADCMDunkNown (default), the performance of the system will be reduced because the ADO must call the provider to determine the commandText property is a SQL statement or a stored procedure or form name. If you know the type of commands being used, you can transfer directly to the correlation code by setting the CommandType property instruction ADO. If the CommandType property does not match the command type in the CommandText property, an error will be generated when the Execute method is invoked. The Adexecutenorecords constant improves performance by minimizing internal processing. This constant is not used independently, which is always used with AdcmdText or AdcmdStoredProc combination (such as AdcmdText AdexecutenoreCords). If you use Adexecutenorecords with RecordSet.Open, or this method will generate an error. Connect Attribute (RDS) Set or returns the database name that runs query and update operations. You can set the connect attribute in the Object tag of the RDS.DataControl object when designing, or sets the CONNECT property in script code (such as VBScript) at runtime. Grammatical design: DATACONTROL.CONNECT = "DSN = DSNNAME; UID = USR; PWD = PW;" parameter DSNNAME Specifies a string of the system data source name, the system data source name identifies the specified database. USR indicates a string of the legal user account on the server. PW represents a string of the user account legal password. DataControl represents the object variable of the RDS.DataControl object. The Connectionstring property contains information for establishing connection data sources. Set and return value settings or returns a string value. Description Use the Connectionstring property to specify a data source by passing a detailed connection string that contains a series of sequagers separated by a semicolon-separated argument = value statement. The ADO supports four parameters of the Connectionstring property, and any other parameter will be passed directly to the provider without the ADO processing. The parameters supported by ADO are as follows:
Parameter Description Provider = Specifies the name of the provider used to connect. FILE NAME = Specifies the file name (for example, a persistent data source object) that contains a particular provider of the connection information in advance. Remote Provider = Specifies the name of the provider used when opening a client connection. (Remote Data Service Only) Remote Server = Specifies the path name of the server used when you open the client connection. (Remote Data Service Only) Set the Connectionstring property and open the Connection object, the provider can change the content of the property, for example by mapping the ADO defined parameter name to its provider equivalence to change the content. The Connectionstring property will automatically inherit the value of the Connectionstring parameter for the Open method to overwrite the current connectionstring property during the Open method call. Since the FILE Name parameter makes the ADO load associated provider, the Provider and File Name parameters cannot be passed. When the connection is closed, the CONNECTIONSTRING property is read / write, and its properties are read-only. When using the service on the client Connection object, the Connectionstring property can only include the Remote Provider and Remote Server parameters. The ConnectionTimeout property indicates that the time waiting for the establishment of the connection before terminating the attempt and generating an error. Setting and return value setting or returning a long integer value (in seconds) that indicates the time waiting for the connection to open. The default is 15. Note If the delay caused by network congestion or server load enables you to abandon the connection attempt, use the ConnectionTimeout property of the Connection object. If the time passed before opening the connection exceeds the time set on the ConnectionTimeout property, an error will occur, and the ADO will cancel the attempt. If the property is set to zero, the ADO will wait until the connection is open. Please confirm that the provider who is writing code will support the ConnectionTIMEOUT function. When the connection is closed, the connectionTimeout property is read / write, and its properties are read-only. Count Attribute Indicates the number of objects in the collection. The return value returns a long integer value. Note The number of objects in a given collection is determined using the count property. Because the number of the collection member is starting from zero, it should always be started at the beginning of a zero member and the end of the count attribute is reduced. If you are using Microsoft® Visual Basic® and want to loop in a collection of members without using the count property, use the for Each ... next command. If the count property is zero, there will be no objects in the collection. CursorLocation property settings or returns the location of the cursor service. Setting and return value setting or return can be set to a long integer value of a constant below.
Constant Description Adusenone does not use cursor services. (This constant is out of time and only in order to compatibility). AduseClient uses client cursors provided by the local bid library. Many of the local cursor services typically allow for use may be that the cursors provided by the driver cannot be used, so use this setting for those who will enable. AduseClient has backward compatibility and also supports synonymous aduseclientbatch. The ADUSERVER defaults. Use the data provider or the cursor provided by the driver. These cursors are sometimes very flexible, and other users have additional sensitivity to changes in data sources. However, some features of Microsoft Client Cursor Provider (such as disconnected records) cannot be simulated by the server-side game, which will not be used by this setting. Note This property allows for selection in various cursor libraries that can be used for the provider. Typically, you can choose to use a client game library or a bike library on the server. This property setting has an impact on the connection established after the attribute has been set. Changing the CursorLocation property does not affect existing connections. For the Connection or the closed Recordset this property is read / write, and the open RECORDSET is read-only. The cursor returned by the Execute method inherits this setting. Recordset will automatically inherit this setting from the connection associated with it. Remote Data Services When used in the client (Ador) Recordset or Connection object, you can only set the CursorLocation property to aduseclient. The CURSORTYPE property indicates the type of cursor used in the Recordset object. Setting and return value settings or returns a CURSORTYPEENUM value. Constant Description AdopenForwardOnly is only a forward cursor, the default value. In addition to only rolling forward in the record, it is the same as the static cursor. When only one-way movement is moved in the recordset, use it improves performance. AdoPenKeyset key set cursor. Although the records from your record set cannot access other users, the key set cursor is similar to the dynamic cursor unable to see the records added by other users. Other users can still change the data. ADOPENDYNAMIC Dynamic Cursor. You can see the addition, changes, and delete of other users. Allows all types of movements in the recordset, but does not include bookmark operations that the provider does not support. AdoPenStatic static cursor. You can use a static copy of the record collection of data or generating a report. In addition, it is not visible to the addition, changes or deletions made by other users. Note Use the Cursortype property to specify the cursor type that should be used when you open the Recordset object. The CURSORTYPE attribute is read / write when RecordSet is closed, and the property is read-only when the RecordSet is open. If you set the CursorLocation property to AduseClient, you only support the settings of the ADUSSTATIC. If the unsupported value is set, it will not cause errors, which will use the closest supported Cursortype. If the provider does not support the requested cursor type, the provider may return other cursor types. When you open the Recordset object, change the CURSORTYPE attribute to match the cursor actually used. To verify the specified feature of the returned cursor, use the Supports method. After turning off the Recordset, the CURSORTYPE attribute will be restored to the original setting. The following table describes the provider features required for each cursor type (identified by the Supports method).
For some of the Recordset CursorType for all these constants, Supports method must return TrueAdOpenForwardOnly no AdOpenKeysetAdBookmark, adHoldRecords, adMovePrevious, adResyncAdOpenDynamicadMovePreviousAdOpenStaticadBookmark, adHoldRecords, adMovePrevious, adResync Note that although the dynamic cursor and forward only cursor Supports (adUpdateBatch) may be true for, but for Batch update should use the key set cursor or static cursor. Set the LockType property to AdlockBatchOptiMistic, and then set the CursorLocation property to AduseClient to enable the OLE DB cursor service you need to rendering the rendering. Remote Data Services When used for Client (Ador) Recordset objects, you can only set the Cursortype property to AdoPenStatic. The DataMber property specifies the name of the data to be retrieved from the object referenced by the DataSource property. Set and return value settings or returns a string value. Name is not case sensitive. Description This property is used to create a data binding control via the "Data Environment". The "Data Environment" saves a data set (data source), and the data set contains a named object (data member) that will be reprorated as the Recordset object. DataMember and DataSource properties must be used together. The DataMber property decision will extract which object specified by the DataSource property as the Recordset object. The Recordset object must be turned off before setting this property. If the DataMember property is not set before setting the DataSource property, or the object specified in the DataSource property cannot recognize the DataMember name, it will generate an error. For more information, see "Control Writer" section of "Data Access SDK". Usage DIM RS As New AdoDb.Recordsetrs.DataMember = "Command" 'Need to bind the row collection name
Set rs.datasource = myde 'The object name containing the IROWSET The DataSource property specifies that the included data will be repremed as the RECORDSET object. Description This property is used to create a data binding control via the "Data Environment". The "Data Environment" saves a data set (data source), and the data set contains a named object (data member) that will be reprorated as the Recordset object. DataMember and DataSource properties must be used together. The referenced object must be executed to execute the iDataSource interface and must contain an IROWSET interface. For more information, see "Control Writer" section of "Data Access SDK". Usage DIM RS As New AdoDb.Recordset
rs.Datamember = "command" 'The name of the column to be bound to