Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 09-27-2007, 03:21 AM
##2912## ##2912## is offline
Junior Member
 
Join Date: Apr 2007
Posts: 12
Default BOF & EOF

Hi,
Please let me know if i execute a query through delphi when does the condition "(Bof and Eof)" together gets satisfied ???

thanks
Reply With Quote
  #2  
Old 09-27-2007, 03:35 AM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,059
Default RE: BOF & EOF

When the query result is empty (No records are return).

[DELPHI]Query.RecordCount ==> 0[/DELPHI]

Regards,
Abdulaziz Jasser
Reply With Quote
  #3  
Old 09-27-2007, 03:46 AM
mshkolnik mshkolnik is offline
Senior Member
 
Join Date: Jul 2001
Posts: 4,195
Default RE: BOF & EOF

if yourQuery.IsEmpty then


With best regards, Mike Shkolnik
http://www.scalabium.com
Reply With Quote
  #4  
Old 09-27-2007, 04:36 AM
##2912## ##2912## is offline
Junior Member
 
Join Date: Apr 2007
Posts: 12
Default RE: BOF & EOF

In my code there is a query as (example query)

"select max(eno) from employee as maxeno where ename='xyz' "
and the table employee does not have any records
but (BOF and EOF) is not satisfied.

i guess when we use max instead of no records, null records
are returned i.e records with NULL as the value ...

so my condition was not getting satisfied...

thanks anyways
Reply With Quote
  #5  
Old 09-27-2007, 07:22 AM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,059
Default RE: BOF & EOF

< are returned i.e records with NULL as the value ...

so my condition was not getting satisfied...>>

YES, you are %100 right. When you use "MAX" function one record will always be returned. So "BoF" & "Eof" will not be satisfied.

Regards,
Abdulaziz Jasser
Reply With Quote
  #6  
Old 09-29-2007, 01:14 PM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,059
Default RE: BOF & EOF

##2912##,

Was my reply to you helpful? If so, please accept.

Regards,
Abdulaziz Jasser
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 09:33 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.