Can this be used?

Michael Krugman admin at ktinet.net
Mon Dec 1 11:55:19 CST 2003


Hi List:

I'm working with V4RB under RB 5.2.2.  I am using a popup menu called 
"Search These", along with a second popup menu called "Operator".  They 
are populated as shown below.  My SELECT statement is built on whatever 
is chosen in these two popup menus.  SEARCHING represents whichever 
choice was selected from the SEARCH THESE popup menu.  Operator.Text 
sets up the case for the operator (=) shown below.  All of these are 
combined to create the SELECT statement...problem is no matter how I 
set it up, I get nothing in the cursor.

   // SearchThese:                   //FIRST POPUP MENU
   'Last
   'First
   'Address
   'City
   'State
   'ZipCode

   // This the Field we will be searching
   searching = SearchThese.text


   // Operator:                        //SECOND POPUP MENU
   'starts with
   'contains
   'ends with
   'is

   // Defines how we are searching
   select case Operator.text
   case "is"
     searchCondition = searching + "=" + ForThis.text  //EDITFIELD USER 
TYPES IN
etc.
etc.
etc.
The other cases would be listed above.  In this scenario, LAST is 
selected in the first popup menu, IS is selected in the second 
one...and there is an editfield (FORTHIS.text) that represents what the 
user types in.  Even under Valentina SQL, this should return the 
contents of the LAST field....it returns a blank cursor.

   // Build the SQL statement and search the database
   SQL = "SELECT  * FROM Clients WHERE"  + searchCondition
   curs = mDataBase.SQLSelect( SQL, kServer, kReadWrite )

I had this working in my RB app with the RB database and I'm trying to 
move to Valentina.  Has anyone else encountered something like this?  
Will these popup menus work with Valentina SQL?  Any help is 
appreciated.

Mike



More information about the Valentina mailing list