I.T. Discussion Community!
-Collapse +Expand
Paradox
Search Paradox Group:

Advanced
-Collapse +Expand Paradox To/From
To/FromCODEGuides
-Collapse +Expand Paradox Store
PRESTWOODSTORE

Prestwood eMagazine

December Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyCorel Paradox / ObjectPAL Coding BoardQBE & SQL Topic   Print This     

Logical field in query by form

Logical field in query by form in QBE & SQL topic (part of our Corel Paradox / ObjectPAL Coding group).

Quick Search: Logical   Logical field   Logical field query   by form  
jlockley
San Francisco, -- UNK

A query launched via pushbutton from a form reads (shortened below)

It functions perfectly until it begins to parse the logical fields which are activated by check boxes on the form. The check boxes have the values "TRUE" and " " (void)

The syntax error is "error incompatible types"  How would the parameters for a logical field read?

Identifying stExec as  String  reports that there is no field "False" in mainrol.db. I must have missed one check box when I altered the unchecked value to void, but it is passing the value as the field name.

Changing the input to a labeled field (enter "TRUE") will probably work, but I'd like to know how to handle a logical field. Any thoughts appreciaated.

method pushButton(var eventInfo Event)

var
  stNAME                            String
 stExec                            Logical

  quQuery                           Query
  tvResults                         tableView

endvar

stName = fldname'value

stExec = fldExec'Value

    if StNAME.isBlank() then
        StNAME = "Check"
    else
        StNAME = "Check " + StNAME
    endif

    if stExec.isBlank() then
        stExec  = "Check"
    else
        stExec  = "Check " + StNAME
    endif

Query

ANSWER: :WORK:Results.db

mainrol.db | Name      | Exec |

                        | ~stName |  ~stExec |

endquery

errorTrapOnWarnings(Yes)
quQuery.writeQBE(":Work:SearchQuery.QBE")
try
    quQuery.executeQBE()
    tvResults.open(":WORK:results.DB")
tvResults.wait()
tvResults.close()
onFail
errorShow()
    msgStop("", "")
endTry
errorTrapOnWarnings(No)

  endMethod

 Posted 9 years ago (Thread Starter)
Comment Quote
About jlockley -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #14364, 1 replies
Thread Started 11/3/2010 10:44:27 PM
View Counter=2588
Last Reply Posted 11/4/2010 6:04:51 PM)
Location=San Francisco, -- UNK 
Joined=9 years ago   MB Posts=35   KB Comments=9  
Most Recent Post
jlockley
San Francisco, -- UNK

Answer to self:

1) Declaring as string worked for a bit. Now not passing value to the query. 

2) The negative value on the query form must be blank. If set to False, only those records with the value false in the logical field will be called up. The checked  value remains TRUE (Or yes, whatever is desired

 Posted 9 years ago (Thread Starter)
Comment Quote
About jlockley -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #14368 (Level 1.1)  Reply to 14364
Thread Started 11/4/2010 5:55:07 PM
Last Reply Posted 11/8/2010 10:27:25 AM)
Location=San Francisco, -- UNK 
Joined=9 years ago   MB Posts=35   KB Comments=9  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1103A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #14364 Counter
2588
Since 11/3/2010

Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech