Visual Basic.NET - ¿Cómo inicializo ésto?

 
Vista:

¿Cómo inicializo ésto?

Publicado por MagnetMan (10 intervenciones) el 01/07/2010 17:36:36
Buenas. Estoy intentando hacer funcionar un ejemplo de Microsoft pero no lo consigo. Una de las cosas que necesito saber es que le tengo que pasar en los dos parámetros de la función de inicializar siguiente:

Public Overrides Sub Initialize(ByVal name As String, ByVal attributes As NameValueCollection)
If IsInitialized Then
Return
End If
MyBase.Initialize(name, attributes)

' Create and test the connection to the Microsoft Access database.
' Retrieve the Value of the Access connection string from the
' attributes NameValueCollection.
Dim connectionString As String = attributes(AccessConnectionStringName)

If Nothing = connectionString OrElse connectionString.Length = 0 Then
Throw New Exception("The connection string was not found.")
Else
accessConnection = New OleDbConnection(connectionString)
End If
initialized = True
End Sub

Según la ayuda los parámetros son "Colección de los pares nombre/valor que representan los atributos específicos de proveedor concretados en la configuración de este proveedor"; pero no se que hay que poner en la llamada a éste Initialize.

¿Alguien me puede echar una mano?
Si necesitais tener el código completo está aquí:
http://msdn.microsoft.com/en-us/library/ms178434.aspx
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder