Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    p@p
    p@p is offline
    New Coder
    Join Date
    Apr 2010
    Location
    Indonesia
    Posts
    71
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Exclude the row on SQL Server 2000

    Greetings codingforums member,

    I've a problems with excluding some row on the sql server 2000 with VB 6.0 (classic)

    the tables MASTLOKASI in sql server:

    KdLokasi | NamaLokasi | AlamatLokasi | Pimpinan | Status
    --------------------------------------------------------
    Resign | Resign | <null> | <null> | <null>
    A1 | Bukit | <null> | <null> | <null>

    And here is the VB 6.0 script:
    Code:
    Sub LoadLokasi()
    Set rsLOKASI = New ADODB.Recordset
             rsLOKASI.CursorLocation = adUseClient
                  rsLOKASI.LockType = adLockOptimistic
                  rsLOKASI.CursorType = adOpenDynamic
                  rsLOKASI.Open "SELECT * FROM MASTLOKASI ORDER BY KdLokasi WHERE ", conn, , , adCmdText
         
      If Not rsLOKASI.EOF Then
            CmbLokasi.Clear
            rsLOKASI.MoveFirst
            
        Do Until rsLOKASI.EOF
           CmbLokasi.AddItem rsLOKASI!KdLokasi
           rsLOKASI.MoveNext
          Loop
             CmbLokasi.ListIndex = 0
            CmbLokasi = ""
         Else
        Exit Sub
      End If
     
    End Sub
    I want to exclude the Resign rows

  • #2
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    Code:
    SELECT * 
    FROM MASTLOKASI 
    WHERE kdLokasi <> 'resign' AND NamaLokasi <> 'resign'
    ORDER BY KdLokasi

  • Users who have thanked WolfShade for this post:

    p@p (06-02-2012)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •