🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #3413

Algun master q me pueda explicar este codigo plis

#3413
From: Herrynet
Date: Fri, 25 Feb 2005 19:25
46 lines
2077 bytes
Hola saludos estoy tratando de trabajar con ADO
aplicandole la propiedad filter al recorset.

Encontre un peque�o ejemplo, pero hay algunas partes que no logro entender,
Soy algo novato en VB 6.

Expongo el codigo:

Private Sub AplicaFiltro()
Dim tFiltro As String
      tFiltro = ""

      If Trim(Form_Fld_Run) <> "" Then
        tFiltro = tFiltro & "(Fld_PRORUN =" & Form_Fld_Run & ") AND "
    End If
//porq los signos asteriscos q funcion cumplen aca y las comillas simples.
     If Form_Fld_Nombre <> "" Then
        tFiltro = tFiltro & "(Fld_PRONOMBRE LIKE '*" & Form_Fld_Nombre &
"*') AND "
    End If

  //Aca no entiendo a causa de que esta haciendo un LEN(parametro) > a 5
�porque? sera q hay espacios en el tfiltro o algo por el estilo.

    If Len(tFiltro) > 5 Then
        tFiltro = UCase(Trim(Mid(tFiltro, 1, Len(tFiltro) - 5)))
    Else
        tFiltro = ""
    End If

    If tFiltro <> "" Then
        registros.Filter = tFiltro
    Else
        registros.Filter = ""
        registros.Requery
    End If

    carga_grilla

End Sub

De antemano se agradece cualquier ayuda e informacion.

Atte

Claudio T.
Technical Details
Message-ID: <cvnu8l$9du$1@news1.nivel5.cl>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!nntp-server.pubsub.com!news1.nivel5.cl!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,42232fb7fe1756de,start
X-Google-Attributes: gid1593cb,public
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!nntp-server.pubsub.com!news1.nivel5.cl!not-for-mail
From: "Herrynet" <herrynet@vtr.net>
Newsgroups: chile.comp.programacion
Subject: Algun master q me pueda explicar este codigo plis
Date: Fri, 25 Feb 2005 16:25:49 -0300
Organization: Varios
Lines: 48
Message-ID: <cvnu8l$9du$1@news1.nivel5.cl>
NNTP-Posting-Host: pc-65-27-104-200.cm.vtr.net
X-Trace: news1.nivel5.cl 1109359701 9662 200.104.27.65 (25 Feb 2005 19:28:21 GMT)
X-Complaints-To: news@news1.nivel5.cl
NNTP-Posting-Date: Fri, 25 Feb 2005 19:28:21 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original