realbasic-nug
[Top] [All Lists]

RE: Problem using Oracle Plugin (2nd try)

To: "REALbasic NUG" <realbasic-nug at lists dot realsoftware dot com>
Subject: RE: Problem using Oracle Plugin (2nd try)
From: "Dixon, Tom" <dixont at Jostens dot com>
Date: Mon, 31 Oct 2005 13:36:23 -0600
Delivered-to: realbasic-nug at lists dot realsoftware dot com
Thread-index: AcXeSKKyIsiuOpnvTp2NDnDvVKGGsAABhYHg
Thread-topic: Problem using Oracle Plugin (2nd try)
Are you using a bound control to run your query rather than querying the
db to a recordset? If this is true I strongly suggest that you not use
bound controls. Try something like the following.

Sub
  // Populates ListBox1 with the results of an SQL Select command string
  Dim rs As RecordSet
    
  rs = DB.SQLSelect("SELECT val2 from pdldetail WHERE val2 LIKE
'%116%'")
  
  If rs <> NIL Then
    ListBox1.deleteAllRows
       
    While Not rs.EOF
      ListBox1.AddRow rs.IdxField(1).Value
      rs.MoveNext
    wend
  Else 
    // Database ErrorAlert Message with 1 Action button
    MsgBox "Database Error: " + DB.ErrorMessage
  End If
End Sub

> Since no one responded to this question the first time I 
> posted it, does anyone know to whom I might send it and get 
> some information?
> 
> I am using Windows XP and RB2005.
> 
> This is a simple query shown here using SQLPLUS:
> 
> rlwq> select val2 from pdldetail where val2 like '%116%';
> 
> VAL2
> -------------------------------------------------------------------
> MH 1166
> CLF-116-M2-1 Inlet flow meter needs calibration Rm 116
> FDR_116_BELT3 needs adjustment
> CO2_116_V5 needs adjustment
> FDR_116_M3_2 connection loose; check wire Rm 116 broken door 
> lock Rm 116
> 
> 6 rows selected.
> 
> When I do the identical query from RB2005 using:
> dbqMaint.sqlquery = "select val2 from pdldetail where val2 
> like '%116%'"
> dbqMaint.runQuery
> 
> it finds NO data.
> 
> If I change the query to:
> dbqMaint.sqlquery = "select val2 from pdldetail where val2 
> like '%Rm 116%'"
> then it returns the 3 rows that contain Rm 116 exactly as it should.
> 
> If I change the query to locate data that starts with any 
> number except 1, then it returns the data perfectly.  If I 
> change the query to read:
> dbqMaint.sqlquery = "select val2 from pdldetail where val2 like '%1%'"
> then it returns every row in the entire table, whether or not 
> it has a 1 in it.
> 
> Can anyone tell me how to get around this?  It has always 
> worked fine in VB 6, but I am trying to transfer user 
> programs to RB2005.
> 
> Thanks a lot!
> Ruth Watkins 
> 
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> 
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>
> 
> 
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>