_Application3.NewADODBConnection Method
Creates and gets a reference to an empty ActiveX Data Objects (ADO) Connection object.
Namespace: Microsoft.Office.Interop.InfoPath
Assembly: Microsoft.Office.Interop.InfoPath (in microsoft.office.interop.infopath.dll)
Syntax
'Declaration
'Usage
Return Value
A reference to an ADO Connection object.
Remarks
If the form is not fully trusted, the NewADODBConnection method will return a "permission denied" error.
Note
This method is not intended to be used in a managed-code form. To query a Microsoft SQL Server database, use the System.Data.SqlClient class and its associated members by adding a reference to the System.Data component and a using clause to System.Data.SqlClient.
Example
object adoConn = thisApplication.NewADODBConnection();
See Also
Reference
_Application3 Interface
_Application3 Members
Microsoft.Office.Interop.InfoPath Namespace