Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/11/2006, 19:06
loquillo7
 
Fecha de Ingreso: abril-2005
Mensajes: 501
Antigüedad: 19 años, 1 mes
Puntos: 1
problemas con componentes

buenas foreros mi consulta es la siguiente estoy utilizando en visual basic 6 el mismo componente que utilizo en asp(en asp funciona muy bien), pero me sale error de automatizacion (pero ese error sale en el componenete no en mi proyecto de visual no entiendo xq sale elllo si en asp funciona bien) nose porque me sucede esto aqui les mando parte del codigo que esta en visual basic 6 en el proyecto:


Public Function b_SolicitarSgteTck(ByVal cAgencia As String, _
ByVal cSector As String, _
ByVal cVentanilla As String) As Long
'Dim objContext As ObjectContext
'Dim objTicket As hTicket.CM_Ticket
Dim objTicket As Object
Dim objVentanilla As Object
Dim objRespVentanilla As Object
Dim objRespTicket As Object
Dim objTool As Object
Dim objTicketAddin As Object
Dim lngResult As Long
Dim dblError As Double
Dim strDescripcionError As String
Dim lngDescripcionError As Long
Dim strhAsignado As String

On Error GoTo ManejaError
'Inicia la transacción
'Set objContext = GetObjectContext()
Set objTool = CreateObject("hTool.CC_Tool")
Set objTicket = CreateObject("hTicket.CM_Ticket")
Set objVentanilla = CreateObject("hVentanilla.CC_Ventanilla")
Set objTicketAddin = CreateObject("hTicketAddin.CC_TicketAddin")


Set objRespVentanilla = objVentanilla.b_SeleccionarVentanilla(cAgencia:=cA gencia, cSector:=cSector, cVentanilla:=cVentanilla)
....................
...................

'En la parte de negrita es donde va al componenete y en el compoenente me sale el error aqui esta el codigo:


Public Function b_SeleccionarVentanilla(Optional ByVal cAgencia As Variant, _
Optional ByVal cSector As Variant, _
Optional ByVal cVentanilla As Variant, _
Optional ByVal cTVentanilla As Variant, _
Optional ByVal bAsignaTicket As Variant, _
Optional ByVal cPerfil As Variant) As Object
''Dim objContext As ObjectContext
Dim objVentanilla As hVentanilla.CM_Ventanilla
Dim objResp As Object
On Error GoTo ManejaError
' 'Set objContext = GetObjectContext()
Set objVentanilla = objContext.CreateInstance("hVentanilla.CM_Ventanil la")
'Llama al procedimiento Seleccionar Ventanilla de CM_Ventanilla
Set objResp = objVentanilla.b_SeleccionarVentanilla(cAgencia, cSector, cVentanilla, cTVentanilla, bAsignaTicket, cPerfil)
objContext.SetComplete
Set b_SeleccionarVentanilla = objResp

endProcess:
'Set objContext = Nothing
Set objVentanilla = Nothing
Set objResp = Nothing
Exit Function

ManejaError:
objContext.SetAbort
Set b_SeleccionarVentanilla = Nothing
'Set objContext = Nothing
Set objVentanilla = Nothing
Set objResp = Nothing
Err.Raise Err.Number, "CC_Ventanilla.b_SeleccionarVentanilla", Err.Description
End Function

Va de frente al Maneja Error me dice "Error de automatizacion y me da un numero" nose que estoy haceindo mal quizas instanciando mal pero como repito en asp este componenete me fucnina perfectamente muchas gracias x la ayuda.