*' Get a data refresh on rvCheckIn
LOCAL nMinutes, cMinutes
nMinutes=0
cMinutes=""
*' suspend
SELECT rvCheckIn
TABLEUPDATE(.T.,.T.)
REQUERY()
GO BOTTOM
GO TOP
*' OK, I'm a little paranoid when do a requery, but it is stable ...
*' Note to self -- Change filter to DBC control in the remote view ...
when you have time
IF oApp.clinic="LIFESKILLS"
SET FILTER TO date_of_appt=DATE() AND
ALLTRIM(clinic)==ALLTRIM(oApp.Start_Page) AND
ALLTRIM(rvCheckIn.subclinic)=ALLTRIM(oApp.subclinic)
ELSE
SET FILTER TO date_of_appt=DATE() AND
ALLTRIM(clinic)==ALLTRIM(oApp.Start_Page)
ENDIF
*' Force a table update
SCAN
nMinutes=(CTOT(TIME())-CTOT(rvCheckIn.Arrival_time))/60
cMinutes=ALLTRIM(STR(nMinutes))
Replace wait_time1 with cMinutes
ENDSCAN
TABLEUPDATE(.T.,.T.)
REQUERY()
GO BOTTOM
GO TOP
******************* End Code snippet ****************
This is old dusty code that works, but I think it is sloppy and wasting
Compute cycles. I'm particularly interested in improving the SCAN block
by
Removing it and using an UPDATE SQL statement. When I tried that I got
a expression error. All I did was combine the computation of nMinutes
and the conversion of that var into a character format into one
expression. The fox didn't like that.
So, how would you all improve the above code?
TIA ...
v/r
//SIGNED//
Stephen S. Wolfe, YA2, DAF
6th MDG Data Services Manager
Comm (813) 827-9994 DSN 651-9994
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.