BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Logic NOT in Filter ...

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop)
View previous topic :: View next topic  
Author Message
بابك
Guest





PostPosted: Sun Jul 02, 2006 12:13 am    Post subject: Logic NOT in Filter ... Reply with quote



Hi
please tell me how can I do this...
I have a Table which contains Sex, Age and Live Status of peoples.
There is male and female, ages between 3 up to 80 years old
I want to filter peoples who are male between 23 and 25 which are NOT dead
!!
I want to learn how can I use not, although I can change my logoc into Are
Alieve but I want to learn using of NOT in Filters.

Table1->Filter="sex='male' AND age <='25' and age >= '20' NOT If_Dead='true'


1-Are these script case sensitive?
2-Can I use logic NOT ? I use this line and I recieve error !
3-Just Strings need ' and ' ? or I can use ' for numbers and logics?
4-If_Dead Field is a boolean field.
Thanks everyone
@};-
Back to top
Antonio Felix
Guest





PostPosted: Sun Jul 02, 2006 2:42 am    Post subject: Re: Logic NOT in Filter ... Reply with quote



Quote:
Table1->Filter="sex='male' AND age <='25' and age >= '20' NOT
If_Dead='true'


1-Are these script case sensitive?

It depends on the FilterOptions.
see the Help on TDataset::FilterOptions

Quote:
2-Can I use logic NOT ? I use this line and I recieve error !

I don't think that the Filter handles NOT.
It was supported under LocalSQL (Remote SQL Tables), but not with Local
Tables
(Dbase,Paradox,FoxPro)

Quote:
3-Just Strings need ' and ' ? or I can use ' for numbers and logics?

You don't need '' for Number Fields.

Quote:
4-If_Dead Field is a boolean field.

Try
Table1->Filter="sex='male' AND age >=20 and age <= 25 AND If_Dead='FALSE'

HTH
Antonio
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.