Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Refresh a single record from a query
Mon, Jul 19 2010 12:06 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Is there a way to refresh a single record from the query below. Essentially I want to update the value in _xUnRead. I'm currently refreshing the query as a whole.



SELECT

IF(_Private,$hgPrivate,-1) AS _xPrivacy,
IF(_aList IS NOT NULL, $hgAttachment,-1) AS _xAttachment,
IF(_fkContacts IS NOT NULL AND _fkContacts > 0,
IF(_InOutInd = $MailIn,$hgTfRMailIn,$hgTfRMailOut),
IF(_InOutInd = $MailIn,$hgMailIn,$hgMailOut)) AS _xMailDir,
CAST(RCF(_emDestination,_Destination,', ') AS VARCHAR(110)) AS _xDestination,
CAST(RCF(_emSender,_Sender,', ') AS VARCHAR(110)) AS _xSender,
CAST(RCF(_Comments,_Subject,' § ') AS VARCHAR(210)) AS _xSubject,
DTF(_Timestamp) AS _xTimestamp,
BytesToKbMb(_Size) AS _xSize,

(SELECT _Monitored FROM MailBoxes WHERE _BoxNo = :Mailbox) AND
NOT EXISTS (SELECT * FROM emReadStatus WHERE _fkEMails = _MsgNo and emReadStatus._fkStaff = $StaffID) AS _xUnRead,

EXISTS (SELECT _Blacklisted FROM emBlacklist WHERE _Blacklisted = _emSender) AS _xBlacklisted,

*

FROM $source
WHERE
_fkMailBoxes = :MailBox
$UsePrivacy AND (_fkStaff IS NULL OR _fkStaff = $StaffID OR _Private IS NULL OR _Private = FALSE)
ORDER BY _TimeStamp DESC


Roy Lambert
Mon, Jul 19 2010 7:30 PMPermanent Link

Richard Harding

Wise Nutrition Coaching

Roy,

>>Is there a way to refresh a single record from the query below. Essentially I want to update the value in _xUnRead. I'm currently refreshing the query as a whole.<<

My understanding is that you can only refresh the whole query and that this is only possible if the query is "live".  Otherwise you need to close and open the query.

Love to find out if there is a better way.

Richard Harding
Tue, Jul 20 2010 2:30 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Richard

>Love to find out if there is a better way.

Me to that's why I'm asking Smiley

Roy Lambert
Wed, Jul 21 2010 5:31 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Richard,

<< My understanding is that you can only refresh the whole query and that
this is only possible if the query is "live".  Otherwise you need to close
and open the query. >>

Nope - EDB can refresh insensitive result sets without requiring a
close/re-open.  It's just not automatic like a sensitive result set - you
have to manually call the TEDBQuery/TEDBScript/TEDBStoredProc Refresh
method.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image