NewADODBRecordset Method

Microsoft Office InfoPath

Show All Show All

NewADODBRecordset Method

Creates and returns a reference to an empty ActiveX Data Objects (ADO) Recordset object.

expression.NewADODBRecordset() ADODB.Recordset

expression    Required. An expression that returns a reference to the Application object.

returns    A reference to an ADO Recordset object.

Security Level

3: Can be accessed only by fully trusted forms.

Remarks

If the form is not fully trusted, the NewADODBRecordset method will return a "permission denied" error.

Example

In the following example, the NewADODBRecordset method of the Application object is used to set a reference to an empty ADO Recordset object:

    var objADORecordset;

objADORecordset = Application.NewADODBRecordset();