lrc_RecordsetAddColumn

ADO Recordset Functions

Adds a new column to a recordset.

void lrc_RecordsetAddColumn( Recordset15* recordset, BSTR name,int type, 
long size, int attribute );
recordsetAn ADO recordset.
nameThe name of the column to add.
typeThe data type of the column.
sizeThe size of the data.
attributeA recordset attribute.

The lrc_RecordsetAddColumn function adds a new column to a recordset. It is similar to the Append ADO method.

To delete a column from a recordset, see the Fields interface Delete method call in MSDN.

Return Values

lrc Return Values

Parameterization

Parameterization is not applicable to this function.

Example

In the following example, the lrc_RecordsetAddColumn adds a new column to a recordset.

int at = lrc_int("-1"); /* default */
lrc_RecordsetAddColumn((Recordset15*)Recordset20_0, "ID", "char", 12, at);