Muchas gracias, ya he comprendido el funcionamiento. Aquí les paso el resultado.
Código PHP:
Imports System.Data.SqlClient
Imports System.Data
Friend Class CapaDL
Dim con As New SqlConnection
Sub abrir()
con = New SqlConnection(ConfigurationManager.ConnectionStrings("CadenaConexion").ConnectionString)
con.Open()
End Sub
Public Function CapaEntidad(ByVal productoId As String) As CapaEE
abrir()
Dim ret As CapaEE = New CapaEE
'Dim oCapaEE As CapaEE
Using bd As New SqlConnection(ConfigurationManager.ConnectionStrings("cadenaConexion").ConnectionString)
Using cmd As New SqlCommand("Ver_Productos", bd)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@ProductID", productoId)
bd.Open()
Dim dr As IDataReader = cmd.ExecuteReader
With dr
While dr.Read()
ret.ProductsID = .Item(0).ToString.Trim
ret.ProdcutsName = .Item(1).ToString.Trim
'oCapaEE = New CapaEE
'oCapaEE.ProductsID = dr.Item(0)
'oCapaEE.ProdcutsName = dr.Item(1)
ret.add(oCapaEE)
End While
End With
End Using
End Using
Return ret
End Function
End Class