¿C贸mo devuelvo un objeto command?
Tengo esta funci贸n:
Function comando(x As String) As Command
Dim ComandLoad As New Command
With ComandLoad
.CommandType = adCmdText
.CommandText = x
.ActiveConnection = Conexion()
End With
End Function
Quiero que devuelva el objeto ComandLoad. ¿Alguien sabe como hacerlo?
Function comando(x As String) As Command
Dim ComandLoad As New Command
With ComandLoad
.CommandType = adCmdText
.CommandText = x
.ActiveConnection = Conexion()
End With
End Function
Quiero que devuelva el objeto ComandLoad. ¿Alguien sabe como hacerlo?
Function comando(x As String) As Command
Dim ComandLoad As New Command
With ComandLoad
.CommandType = adCmdText
.CommandText = x
.ActiveConnection = Conexion()
End With
comando=CommandLoad
End Function
en el procedimiento pones :
Dim CommandQueQuieresRecoger as new Adodb.Command
CommandQueQuieresRecoger=comando(Vble_Para_Pasar_A_La_Funcion)
Dim ComandLoad As New Command
With ComandLoad
.CommandType = adCmdText
.CommandText = x
.ActiveConnection = Conexion()
End With
comando=CommandLoad
End Function
en el procedimiento pones :
Dim CommandQueQuieresRecoger as new Adodb.Command
CommandQueQuieresRecoger=comando(Vble_Para_Pasar_A_La_Funcion)
