Dim rs AS recordset
   rs = App.QMPdata.SQLSelect("SELECT * FROM TakeData WHERE TestNm = '"  
   + myTest + "' OR TestNm = '" + altTest + "'")

Try:

   rs = App.QMPdata.SQLSelect("SELECT * FROM TakeData WHERE (TestNm = '"  
   + myTest + "' OR TestNm = '" + altTest + "');")

Note the extra parentheses.

Also, for anything other than quick interactive playing with SQL,
never do "Select *".  Instead, do:

        Select ( column1, column2, ... ) ...

as "Select *" results will change if you ever modify the table
structure.

Also, be sure to do proper SQL quoting on TakeData, myTest, TestNM,
and altTest (or, at least those of them that are accepted from the
user and/or outside world).

Craig
_______________________________________________
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>

Reply via email to