| Programmering - Componenter - ADO - Connection - Recordset - Fields, Field |
| RecordSet.Fields(index).property |
Provides access to individual fields in the current record of a recordset
- index is either the fields name or its ordinal position.
The Fields collection is the default object for any Recordset - and Value is the default property.
If "memberid" is the first field, the following expressions are all equivalent:
| rs.Fields("memberid").Value rs.Fields("memberid") rs("memberid").value rs("memberid") rs.Fields(0).value rs(0) |
For i = 1 to rs.Fields.Count --- Next |
| adFldMayDefer | &H00000002 | The field is deferred - ADO will not retrieve the field's value unless you explicitly asks for it. |
| adFldUpdatable | &H00000004 | You can write to the field |
| adFldUnknownUpdatable | &H00000008 | The provider cannot determine whether you can write to the field |
| adFldFixed | &H00000010 | The field contains fixed-length data |
| adFldIsNullable | &H00000020 | The field accepts NULL values |
| adFldMayBeNull | &H00000040 | You can read NULL values from the field |
| adFldLong | &H00000080 | A long binary field. The AppendChunk and GetChunk methods may be used. |
| adFldRowID | &H00000100 | The field contains som kind of record-ID |
| adFldRowVersion | &H00000200 | The field contains a time or date stamp used to track updates |
| adFldCache Deferred | &H00001000 | The provider caches field values - and subsequent reads are done from the cache |
| adFldKeyColumn | &H00008000 | The field is part of a key |
| adEmpty | 0 | No value specified |
| adSmallInt | 2 | 2-byte (16 bit) signed Integer |
| adInteger | 3 | 4-byte (32 bit) signed Integer |
| adSingle | 4 | Single-precision floating-point value |
| adDouble | 5 | Double-precision floating-point value |
| adCurrency | 6 | A fixed-point Currency value with 4 decimal digits - stored as an 8-byte signed Integer (multiplied by 10.000) |
| adDate | 7 | A double-precision Date value. The whole part is the number of days since 1899-12-30, the fractional part is the fraction of a day |
| adBSTR | 8 | A null-terminated character string |
| adIDispatch | 9 | A pointer to an IDispatch interface on an OLE object |
| adError | 10 | A 32-bit error code |
| adBoolean | 11 | A Boolean value |
| adVariant | 12 | An Automation Variant |
| adUnknown | 13 | A pointer to an IUnknown interface on an OLE object |
| adDecimal | 14 | An exact numeric value with a fixed precision and scale |
| adTinyInt | 16 | 1-byte signed Integer |
| adUnsignedTinyInt | 17 | 1-byte unsigned Integer |
| adUnsignedSmallInt | 18 | 2-byte unsigned Integer |
| adUnsignedInt | 19 | 4-byte unsigned Integer |
| adBigInt | 20 | 8-byte signed Integer |
| adUnsignedBigInt | 21 | 8-byte unsigned Integer |
| adGUID | 72 | A globally unique identifier |
| adBinary | 128 | A binary value |
| adChar | 129 | A string |
| adWChar | 130 | A null-terminated Unicode character string |
| adNumeric | 131 | An exact numeric value with a fixed precision and scale |
| adUserDefined | 132 | A user-defined variable |
| adDBDate | 133 | A date value (yyyymmdd) |
| adDBTime | 134 | A time value (hhmmss) |
| adDBTimeStamp | 135 | A date-time stamp (yyyymmddhhmmss plus a fraction in billionths) |
| rs.Fields("memberid").Value rs.Fields("memberid") rs("memberid").value rs("memberid") |