Attribute VB_Name = "Module1"
Public Function VerificarOrdenCenTemp(ByVal DblCorrelativo As Double, ByVal DblNumeroBonus As Double, ByVal StrcodProd As String, Optional VarAux As Variant) As Boolean
 Dim rs As ADODB.Recordset
 Dim StrSql As String
  
  On Error GoTo errhandler
      
  StrSql = " SELECT NBRBONUS FROM TMP_OP_ordenC WHERE CORRNBR=" & DblCorrelativo & " and " & _
           " NBRBONUS=" & DblNumeroBonus & " and INVTIDSKU='" & StrcodProd & "'"
  
  
  Set rs = New ADODB.Recordset
  rs.CursorLocation = adUseClient
  rs.Open StrSql, "FILEDSN=conexionsies", adOpenStatic
   
  If rs.EOF Then
     VerificarOrdenCenTemp = False
  Else
     VerificarOrdenCenTemp = True
  End If
  
  'GetObjectContext.SetComplete
  
  Exit Function
errhandler:

    If Not rs Is Nothing Then
       Set rs = Nothing
    End If
    
'    GetObjectContext.SetAbort
'
'    Err.Raise Err.Number, "DB_OP_FACTURACION.C_VENTASPLAYA.VerificarOrdenCenTemp", Err.Description
   
End Function


