Function ReplaceString(ByVal strSearch As String, ByVal strSearchFor As String, ByVal strReplaceWith As String) As String
        Try
            '--> Busca la variable del strSearch para strSearchFor y la substituye por el strReplaceWith.
            Dim lngFoundLoc As Long    ' Location of match.
            Dim lngLenRemove As Long   ' Length of string being replaced.
            '--> Fije la longitud del texto original para saltar.
            lngLenRemove = Len(strSearchFor)
            '--> Fije la localización match.
        ... Leer más »
Vistas: 512 | Agregado por: miket | Fecha: 11.30.2012 | Comentarios (0)


'--> Esta funcion permite desencriptar datos que fueron encriptados con la funcion encripta.
    Public Function Decrypta(ByVal cTexto As String, ByVal nLlave As Integer) As String
        Dim nLargo As Long
        Dim n As Long
        Dim cCaracter As String
        Dim NewCadena As String
        Dim NewNumero As Long

        nLargo = Len(cTexto)
        NewCadena = ""
        NewNumero = (nLlave / 256) * 4

        For n = 1 To nLargo
            cCaracter = Chr(Asc(Mid(cTexto, n, 1)) - NewNumero)
         &n ... Leer más »
Vistas: 492 | Agregado por: miket | Fecha: 11.30.2012 | Comentarios (0)

    Public datname, bakname, tstream As Object, tempFileName As Object, strES As Object
    Public optio As Integer
    Public strOpt As Object, strFileEnd As Object
    Public i As Long
    Public j, k, l As Integer
    Public dig_number As Long
    Public row_number As Long
    Public strTempNumber, strRndNumber As Object, strElse$, ESPassword$
    Public min, max As Integer
    Public rndNumber, rndElse, diffNumber, sumNumber As Integer
    Public Lines As Long
    Public ES As Boolean

    Public Function GeneratePassword( _
      ByVal intLength As Integer, _
      Optional ByVal bolWithNumber As Boolean = False, Optional ByVal bolWithUpperCase As Boolean = False, Optional ByVal bolWithAll As Boo ... Leer más »
Vistas: 618 | Agregado por: miket | Fecha: 11.30.2012 | Comentarios (0)

    Public Sub mySetFocus(ByVal sPage As Page, ByVal ctrl As String)
        Dim f As StringBuilder = New StringBuilder()
        f.Append("<script language='JavaScript'>")
        f.Append("function setFocus() {")
        f.Append("document.getElementById('")
        f.Append(ctrl)
        f.Append("').focus();}")
        f.Append(" window.onload=setFocus;")
        f.Append("</")
        f.Append("script>")
        sPage.ClientScript.RegisterClientScriptBlock(sPage.GetType(), "<Focus>", f.ToString())
    End Sub
Vistas: 473 | Agregado por: miket | Fecha: 11.30.2012 | Comentarios (0)

 Public Function Validar_Email(ByVal Email As String) As Boolean
        Dim i As Integer, iLen As Integer, caracter As String
        Dim pos As Integer, bp As Boolean, iPos As Integer, iPos2 As Integer

        On Error GoTo ErrorValidar_Email

        Email = Trim$(Email)

        If Email = vbNullString Then
            Exit Function
        End If

        Email = LCase$(Email)
        iLen = Len(Email)


        For i = 1 To iLen
            caracter = Mid(Email, i, 1)

     &n ... Leer más »
Vistas: 515 | Agregado por: miket | Fecha: 11.30.2012 | Comentarios (0)

    Function Dias_Naturales(ByVal fechaIni As Date, ByVal sDias As Integer) As Date
        fechaIni = Format("dd/MM/yyyy", fechaIni)
        'Dias_Naturales = DateDiff(("d"), fechaIni, fechaFin)
        Dias_Naturales = DateAdd(DateInterval.Day, sDias, fechaIni)
    End Function
Vistas: 488 | Agregado por: miket | Fecha: 11.30.2012 | Comentarios (0)

 Function El_Dia_es_habil(ByVal fechaIni As Date, ByVal fechaFin As Date) As Integer
        Dim i As Integer
        Dim sDiasNoHabil As Integer
        Dim sDias As Integer
        Dim DayOfWeek As FirstDayOfWeek

        sDiasNoHabil = 0
        fechaIni = Format("dd/MM/yyyy", fechaIni)
        fechaFin = Format("dd/MM/yyyy", fechaFin)
        sDias = DateDiff(("d"), fechaIni, fechaFin)
        sDiasNoHabil = sDias

        i = 1
        Do While i <= sDias
            fechaFin = DateAdd(DateInterval.D ... Leer más »
Vistas: 597 | Agregado por: miket | Fecha: 11.30.2012 | Comentarios (0)

'--> Abrir RecordSet con Ado
    Public Function AbreRS(ByVal sConsulta As String, ByVal cnSistema As ADODB.Connection, ByVal sTipoMotor As Integer) As ADODB.Recordset '--> Establecer base de datos que esta utilizando
        On Error GoTo ErrorAbrers

        AbreRS = New ADODB.Recordset
        '--> SQL Server
        If sTipoMotor = 0 Then
            With AbreRS
                .let_Source(sConsulta)
                .ActiveConnection = cnSistema
                .CacheSize = 50
      & ... Leer más »
Vistas: 535 | Agregado por: miket | Fecha: 11.30.2012 | Comentarios (0)

'--> Abrir base de datos con Ado
    Public Function AbreBD(ByVal Source As String, ByVal BaseDatos As String, ByVal User As String, ByVal Contraseña As String, ByVal sTipoMotor As Integer) As ADODB.Connection '--> Abrir una base de datos
        On Error GoTo ErroresAbrirBD

        AbreBD = New ADODB.Connection
        If sTipoMotor = 0 Then
            '--> Abrir base de datos en SQL Server
            With AbreBD
                .ConnectionString = "Provider=SQLOLEDB;Password=" & Contraseña & ";Persist Security Info=True;User ID=" & User & ";Initial Catalog=" & BaseDatos & ";Data Source=" & Source & ""
  & ... Leer más »
Vistas: 489 | Agregado por: miket | Fecha: 11.30.2012 | Comentarios (0)

    '---------------------------------------------------------------------
    ' EncryptString
    ' Optimizing by Harvey T.
    ' Corregido por Miguel A. Vallejo Duran
    '---------------------------------------------------------------------
    Public Const ENCRYPT As Integer = 1, DECRYPT As Integer = 2

    Function EncryptString(ByVal Text As String, ByVal Action As Single, ByVal UserPassword As String) As String
        Dim UserKey As String
        Dim Temp As Integer
        'Dim Times As Integer
        Dim i As Integer
        Dim j As Integer
        Dim n As Integer
        Dim rtn As Stri ... Leer más »
Vistas: 915 | Agregado por: miket | Fecha: 11.30.2012 | Comentarios (0)

1 2 3 4 »
Martes, 11.26.2024, 1:48 AM
Menú del sitio
Formulario de entrada
Búsqueda
Archivo de registros
Estadística

Total en línea: 1
Invitados: 1
Usuarios: 0
Calendario
«  Noviembre 2024  »
LuMaMiJuViSaDo
    123
45678910
11121314151617
18192021222324
252627282930
 






Copyright nientiendo © 2024 Miguel A. Vallejo Duran