Can this be used?

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Dec 1 22:03:42 CST 2003


on 12/1/03 7:55 PM, Michael Krugman at admin at ktinet.net wrote:

Hi Mike,

> 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 recommend do next:

-- in the debugger step to the line SqlSelect().
    and check what SQL STRING you send to it.

Very often developers just do mistakes in SQL string building.


-- Having that string, you can COPY it and test from viSQL.

-- also check if Valentina return any error code.

> 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.

Aha, NO, popups menu DO NOT work self with Valentina.
You need get value from menu and pass it to Valentina.

GUI is GUI.
DB engine is DB engine.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list