Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SFQuery
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Stonefield
Titre:
Divers
Thread ID:
01647996
Message ID:
01648008
Vues:
31
>>>Hi,
>>>
>>>I am using an old version of Stonefield Query (for WHERE clause of SQL Selects). As I am refactoring my application, I came across the following need/issue:
>>>Example: In the current version when user selects to query on a value in a field (usually a unique/ID field), the resulting cFilter expression looks something like this:
>>>
>>>cFilter = "upper(PartsFile.Part_ID) = 'XYZ123  '"
>>>
>>>The Part_ID is a unique field name of a table. For example, Part ID in the Parts file. Now I want the program to use the PK field of the table. So when user enters in the SFQuery Part_ID 'XYZ123' I want the SFQuery to return the following:
>>>
>>>cFilter = 'PartsFile.Part_PK = 3444'
>>>
>>>Anybody know how to change in SFQuery (and where to change it) that it selects the PK field and not the Unique Field?
>>>
>>>TIA
>>
>>What I don't understand is as follows:
>>I have one field (Integer) with a lookup control being a Combo and the SFQuery sets the filter condition to the PK field value. E.g.
>>
>>cFilter = 'TableName.Pk_Field_name = 33333'
>>
>>
>>And I have another field (also Integer) with lookup control being Container with a textbox and a button, that when user clicks on a Select/Ok, the filter is set to the ID Field value and not PK_Field value.
>>Example:
>>
>>cFilter = "TableName.Pk_Field_name = 'ValueOfIDField'"
>>
>>
>>Somehow the SFQuery "knows" what value to set in the resulting cFilter. And this is what I am not understanding.
>
>I think I got it. The SFQuery looks at the value in the Value property of the control.

After spending hours today trying to figure out how to change something in SFQuery and making many changes, now I realize that this "new" behavior of SFQuery is not what I want. Software development is not easy :).
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform