Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 2.83 KB

File metadata and controls

48 lines (37 loc) · 2.83 KB
title Value Property (ADO) | Microsoft Docs
ms.prod sql
ms.prod_service connectivity
ms.technology connectivity
ms.custom
ms.date 03/20/2018
ms.reviewer
ms.topic conceptual
apitype COM
f1_keywords
Field20::Value
_Parameter::Value
helpviewer_keywords
Value property [ADO]
ms.assetid 48919c74-86d4-462e-99b9-8854ceb8d683
author MightyPen
ms.author genemi

Value Property (ADO)

Indicates the value assigned to a Field, Parameter, or Property object.

Settings and Return Values

Sets or returns a Variant value that indicates the value of the object. Default value depends on the Type property.

Remarks

Use the Value property to set or return data from Field objects, to set or return parameter values with Parameter objects, or to set or return property settings with Property objects. Whether the Value property is read/write or read-only depends upon numerous factors. See the respective object topics for more information.

ADO allows setting and returning long binary data with the Value property.

Note

For Parameter objects, ADO reads the Value property only once from the provider. If a command contains a Parameter whose Value property is empty, and you create a Recordset from the command, ensure that you first close the Recordset before retrieving the Value property. Otherwise, for some providers, the Value property may be empty, and won't contain the correct value.

For new Field objects that have been appended to the Fields collection of a Record object, the Value property must be set before any other Field properties can be specified. First, a specific value for the Value property must have been assigned and Update on the Fields collection called. Then, other properties such as Type or Attributes can be accessed.

Applies To

Field Object Parameter Object Property Object (ADO)

See Also

Value Property Example (VB) Value Property Example (VC++)