Go Back   CodingForums.com > :: Server side development > MySQL > Other Databases

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-30-2012, 05:49 AM   PM User | #1
p@p
New Coder

 
Join Date: Apr 2010
Location: Indonesia
Posts: 71
Thanks: 4
Thanked 0 Times in 0 Posts
p@p has a little shameless behaviour in the past
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
p@p is offline   Reply With Quote
Old 04-30-2012, 05:00 PM   PM User | #2
WolfShade
Regular Coder

 
Join Date: Apr 2012
Location: St. Louis, MO, USA
Posts: 950
Thanks: 7
Thanked 98 Times in 98 Posts
WolfShade is an unknown quantity at this point
Code:
SELECT * 
FROM MASTLOKASI 
WHERE kdLokasi <> 'resign' AND NamaLokasi <> 'resign'
ORDER BY KdLokasi
WolfShade is offline   Reply With Quote
Users who have thanked WolfShade for this post:
p@p (06-02-2012)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:55 PM.


Advertisement
Log in to turn off these ads.