Condividi tramite


OracleClientFactory.CreateConnection Metodo

Definizione

Restituisce un'istanza di DbConnection fortemente tipizzata.

public:
 override System::Data::Common::DbConnection ^ CreateConnection();
public override System.Data.Common.DbConnection CreateConnection ();
override this.CreateConnection : unit -> System.Data.Common.DbConnection
Public Overrides Function CreateConnection () As DbConnection

Restituisce

Nuova istanza fortemente tipizzata dell'oggetto DbConnection.

Esempio

Il frammento di codice seguente restituisce un'istanza fortemente tipizzata DbConnection .

Dim newFactory As OracleClientFactory = OracleClientFactory.Instance  
Dim connection As DbConnection = newFactory.CreateConnection()  
OracleClientFactory newFactory = OracleClientFactory.Instance;  
DbConnection connection = newFactory.CreateConnection();  

Si applica a