VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "Cls_general"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

Public Function escentral(Optional VarAux As Variant) As Boolean
    Dim StrSql As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
    

    StrSql = " SELECT central FROM SETUP  "
    
    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    rs.Open StrSql, "FILEDSN=conexionsies", adOpenUnspecified, adLockUnspecified, adCmdUnspecified
        
        
    escentral = rs!central
    
    GetObjectContext.SetComplete
        
    Exit Function
    
TrataError:
    If Not rs Is Nothing Then
        Set rs = Nothing
    End If
    
    GetObjectContext.SetAbort
    
    Err.Raise Err.Number, "lib_trasmision.general escentral", Err.Description

End Function

Public Function meta_tabla(ByVal Str_tabla As String, Optional VarAux As Variant) As ADODB.Recordset
    Dim StrSql As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError

    StrSql = " sh_metatabla '" & Str_tabla & "'"
    
    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    rs.Open StrSql, "FILEDSN=conexionsies", adOpenUnspecified, adLockUnspecified, adCmdUnspecified
        
    Set meta_tabla = rs
    
    GetObjectContext.SetComplete
        
    Exit Function
    
TrataError:
    If Not rs Is Nothing Then
        Set rs = Nothing
    End If
    
    GetObjectContext.SetAbort
    
    Err.Raise Err.Number, "lib_trasmision.cls_envios", Err.Description

End Function
Public Function existetabla(ByVal Strtabla As String, Optional VarAux As Variant) As Boolean
    Dim StrSql As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
    

    StrSql = " existetabla '" & Strtabla & "'"
    
    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    rs.Open StrSql, "FILEDSN=conexionsies", adOpenUnspecified, adLockUnspecified, adCmdUnspecified
        
    If rs!existe = 0 Then
        existetabla = False
    Else
        existetabla = True
    End If
    
    GetObjectContext.SetComplete
        
    Exit Function
    
TrataError:
    If Not rs Is Nothing Then
        Set rs = Nothing
    End If
    
    GetObjectContext.SetAbort
    
    Err.Raise Err.Number, "lib_trasmision.cls_envios", Err.Description

End Function

Function tablasrecepcion(Optional VarAux As Variant) As ADODB.Recordset
Dim StrSql As String
    Dim rs As ADODB.Recordset
    
    On Error GoTo TrataError
    
    StrSql = " sh_tablasrecepcion "
    Set rs = New ADODB.Recordset
    rs.CursorLocation = adUseClient
    rs.Open StrSql, "FILEDSN=conexionsies", adOpenUnspecified, adLockUnspecified, adCmdUnspecified
    Set tablasrecepcion = rs
    GetObjectContext.SetComplete
        
    Exit Function
    
TrataError:
    If Not rs Is Nothing Then
        Set rs = Nothing
    End If
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "lib_trasmision.cls_envios", Err.Description
End Function

Public Function Auxiliar1(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "lib_trasmision.Cls_general.Auxiliar1", Err.Description
End Function

Public Function Auxiliar2(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "lib_trasmision.Cls_general.Auxiliar2", Err.Description
End Function

Public Function Auxiliar3(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "lib_trasmision.Cls_general.Auxiliar3", Err.Description
End Function

Public Function Auxiliar4(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "lib_trasmision.Cls_general.Auxiliar4", Err.Description
End Function

Public Function Auxiliar5(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "lib_trasmision.Cls_general.Auxiliar5", Err.Description
End Function


Public Function Auxiliar6(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "lib_trasmision.Cls_general.Auxiliar6", Err.Description
End Function

Public Function Auxiliar7(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "lib_trasmision.Cls_general.Auxiliar7", Err.Description
End Function

Public Function Auxiliar8(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "lib_trasmision.Cls_general.Auxiliar8", Err.Description
End Function

Public Function Auxiliar9(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "lib_trasmision.Cls_general.Auxiliar9", Err.Description
End Function

Public Function Auxiliar10(Optional ByVal VarAux1 As Variant, Optional ByVal VarAux2 As Variant) As Variant
    ' Funcion
    
    On Error GoTo errhandler
    
    
    
    GetObjectContext.SetComplete
    
    Exit Function
errhandler:
    GetObjectContext.SetAbort
    Err.Raise Err.Number, "lib_trasmision.Cls_general.Auxiliar10", Err.Description
End Function
