Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with ==
Message
From
03/07/2002 11:15:21
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
03/07/2002 09:27:15
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00674353
Message ID:
00674960
Views:
23
Hi Gregory,
it works perfeclty now.

Let me tell you the whole story, so you can imagine the problem.

I'm a lazy programmer.
I've definded a container to define a single filter statement. This container owns a propery 'gcField' this is contains field to handle (or a placeholder for later usage or whatever), it is usualy that to place as value to test.

There is a option group the switches 'BETWEEN','OFF','COMPARE'. It has also two textboxes for the "from" and "to" value for 'between' and a textbox for value 'compare' toghether with a combo 'Operator'. Ah it owns a 'NOT' checkbox and a label.

The user may set a operation and a value as well as the 'not'.

The container also owns a GetOperation Method that Returns if a operation is select and the statement as well as the statement for displaying and storing and so on.

The container will work for differnt type of data.
Depending on the data type changes the value of the 'operations' combo, for Char it uses '=','==' and '=^'(LIKE)

Those container may be contained by a different container that holds a lot of this containers.
Normaly there is a 'cancel' and a 'ok' button, the 'ok' reads all statements out of the single containers link the statements with "AND" (Anything more complex means to teach sombody boolean algebra. Common user is in need for a calculator by 6*7. If they understand boolean algebra it is easier to get the statement by text then to generate complex interface)

All my trouble starts as I need to stop the thing displaying empty results (customer wish). So I get all my statements and use a simple SELECT SQL to get _TALLY. If 0 operation is canceled. But sometimes this failed. And the problem was the '==' operation.

The result of the container may be used for SET FILTER, for SELECT SQL, sometimes (in rare crule code) as the FOR statement of a SCAN or to change the statement of a DYNAMIC* in a Grid, simply for whatever a boolean logic may by needed.

This runs since 1999, excepted the '==' problem.

Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform