Binding entry Hong

xiaoxiao2021-03-06  45

The binding entry macro binding entry macro defines a correspondence between a RECORDSET field and a variable. The binding macro of each entry consists of start macros and end macros and is paired. The macro of the fixed length data is suitable for addte, Adboolean et al, digital macro is suitable for ADTINYINT, AdINteger, and AddouBle, and the macro that makes the length of data is applied to Adchar, Advarchar, and Advarbinary. All digital types are also a fixed length data type except AdvarNumeric. There are different parameter groups between each macro, so you can exclude binding information that is not interested. OLE DB Programmer's Reference See Appendix A: More information start data type binding entry BEGIN_ADO_BINDING (Class) fixed length data: ADO_FIXED_LENGTH_ENTRY (Ordinal, DataType, Buffer, Status, Modify) ADO_FIXED_LENGTH_ENTRY2 (Ordinal, DataType, Buffer, Modify) number data: ADO_NUMERIC_ENTRY (Ordinal, DataType, Buffer, Precision, Scale, Status, Modify) ADO_NUMERIC_ENTRY2 (Ordinal, DataType, Buffer, Precision, Scale, Modify) variable-length data: ADO_VARIABLE_LENGTH_ENTRY (Ordinal, DataType, Buffer, Size, Status, length , Modify) ADO_VARIABLE_LENGTH_ENTRY2 (Ordinal, DataType, Buffer, Size, Status, Modify) ADO_VARIABLE_LENGTH_ENTRY3 (Ordinal, DataType, Buffer, Size, Length, Modify) ADO_VARIABLE_LENGTH_ENTRY4 (Ordinal, DataType, Buffer, Size, Modify) end binding END_ADO_BINDING ()

The parameter describes the name of Class derived class. Ordinal originates from 1, corresponding to the fields in the Recordset. DataType corresponds to the ADO data type corresponding to the C / C variable (see DataTyPeenum to get a list of valid data types). If necessary, the value of the field is converted to the value of this type. The name of the C / C variable corresponding to the buffer. Size The maximum number of bytes of the C / C variable. If it is a growing string, use 0 to represent it. STATUS indicates the name of the variable. This variable is used to indicate whether the buffer is valid, whether the data conversion is successful. The value Adfldok means the success of the conversion; AdfldNull means that the value of the field is empty. Other possible values ​​see the list of status values ​​later. Modify logic sign. TRUE means that ADO allows the value of the fields in the Recordset to be updated using variable values. Set this value to TRUE will allow updates, if you only want to check the value of the field instead, set it to false. The number of PRECISION digital variables. Scale digital variables of the number of decimal numbers. Length a 4-byte variable name. This variable will include the actual length of the data in the buffer. The value of the status value variable STATUS indicates whether the value of a field is successfully copied to the corresponding variable. When writing data, you can assign the Status to AdfldNull to indicate that the field will be set to NULL.

转载请注明原文地址:https://www.9cbs.com/read-58737.html

New Post(0)