Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating SQL Grid? 1

Status
Not open for further replies.

foxrainer

Programmer
Jan 10, 2002
270
US
Using a table which has patient data and return visits, I made a page on a pageframe which shows return visits per week for 5 weeks, using 5 seperate Grids, each populated with SQL results (see below). The grids work fine, but I can't come up with a good method of refreshing the grids in the data. Say, I change the ReturnDate of a patient in Grid1 (week 1). The date qualifies the patient to now show up in grid two.

Also, the

How can the grids be updated?

Here are the SQL statments for each grid:

SELECT name, LEFT(CDOW(return),2) AS ShortDay, TTOD(return) AS returnDt, code FROM patient WHERE Return > (Date() - DOW(date()) ) +1 AND return < (Date() - DOW(Date() ) )+ 7 AND UPPER(active) = 'YES' ORDER BY Return INTO CURSOR ReturnWeek1

SELECT name, LEFT(CDOW(return),2) AS ShortDay, TTOD(return) AS returnDt, code FROM patient WHERE Return > (Date() - DOW(date()) ) +8 AND return < (Date() - DOW(Date() ) ) + 14 AND UPPER(active) = 'YES' ORDER BY Return INTO CURSOR ReturnWeek2

... Same idea with SQL's grid 3-5, just different numbers at the end.

Any help would be greatly appreciated,

Rainer
 
Instead of regular SQL statements, you should be using Views, which are SQL statements that are stored in a DBC. You don't have to use the same DBC you use for your permanent data (in fact, I recommend against it). And you can simply REQUERY the view when you want to repopulate it.


-BP (Barbara Peisch)
 
Michael,

thank you very much, that actually is vry helpful!

Rainer
Gloversville, New York
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top