Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG? SQL Thermometer display. vfp8 and 9 beta
Message
From
27/01/2005 13:18:08
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
BUG? SQL Thermometer display. vfp8 and 9 beta
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00981313
Message ID:
00981313
Views:
74
Hi All

I've wondered at the lack of SQL progress bars off and on for the past several months, but haven't been inclined to run it down until today. The progress bars are not working in VFP8 and the VFP 9 beta! I don't remember ever having to involve the command window to get this display. Is this a bug?

The SQL thermometer/progress bar does not show if all you have is SET TALK ON and SET NOTIFY ON. I don't have VFP7 or earlier to test.

It does if you're in the command window when you make those settings and run a query or requery.

So, I theorized the command window was involved and wrote something to prove it. First off, you'll need a large table to query. This will create a 1,000,000 record table.
MD C:\SPEED
CREATE TABLE C:\SPEED\SPEED.DBF FREE ;
  (Spd_ID I, ;
  Spd_Char C(10), ;
  Spd_Date D, ;
  Spd_DT T)

LOCAL ;
  m.lnI, ;
  m.lnX, ;
  m.Spd_ID, ;
  m.Spd_Char, ;
  m.Spd_Date, ;
  m.Spd_DateTime

FOR m.lnI = 1 TO 1000000
  m.SPD_ID = m.lnI
  m.SPD_CHAR = TRANSFORM(m.lnI)
  *This will give me groups of records
  *with the same date / date time.
  m.LNX = m.lnI/100
  m.SPD_DATE = {^2000-01-01}+m.lnX
  m.SPD_DT = {^2000-01-01 00:00:00}+m.lnX
  INSERT INTO SPEED FROM MEMVAR
  IF MOD(m.lnI,1000) = 0
    WAIT WINDOW TRANSFORM(m.lnI) NOWAIT
  ENDIF
ENDFOR
INDEX ON SPD_ID TAG SPD_ID
INDEX ON SPD_CHAR TAG SPD_CHAR
INDEX ON SPD_DATE TAG SPD_DATE
INDEX ON SPD_DT TAG SPD_DT
CLEAR ALL
The following code will demonstrate the progress bar NOT appearing. Uncomment the lines indicated in the comments to show the progress bar.
SET TALK NOWINDOW
SET TALK OFF
SET NOTIFY OFF

lcOldPath = SET("PATH")
lcNewPath = "c:\speed;" + m.lcOldPath
SET PATH TO &lcNewPath.

IF NOT FILE("C:\SPEED\EQ.DBC")
  CREATE DATABASE C:\SPEED\EQ.DBC
ENDIF

OPEN DATABASE EQ
SET DATABASE TO EQ

IF NOT INDBC("V_EQ","VIEW")
  CREATE VIEW V_EQ AS SELECT * FROM C:\SPEED\SPEED.DBF WHERE BETWEEN(SPD_DATE, ?m.ldLow, ?m.ldHigh)
ENDIF

USE EQ!v_EQ NODATA

m.ldLow = {^2000-01-01}
m.ldHigh = {^2273-10-16}

*To prove the command window's involvement,
*uncomment/comment the next 5 lines
*m.llHideCommand = (WVISIBLE("COMMAND") = .F.)
*m.lnWLRow = WLROW("COMMAND")
*m.lnWLCol = WLCOL("COMMAND")
*MOVE WINDOW COMMAND TO -100,-100
*SHOW WINDOW COMMAND

DEFINE WINDOW wSetTalk FROM -100,-100 TO -10,-10

SET TALK WINDOW wSetTalk
SET TALK ON
SET NOTIFY ON

=REQUERY()
SET TALK OFF
SET NOTIFY OFF
SET TALK NOWINDOW
RELEASE WINDOWS wSetTalk

*To prove the command window's involvement,
*uncomment/comment the next 5 lines
*IF m.llHideCommand
*  HIDE WINDOW COMMAND
*ENDIF
*MOVE WINDOW COMMAND TO m.lnWLRow, m.lnWLCol

SET PATH TO &lcOldPath.
Please confirm this for me? Tell me what I've missed if anything?

Thanks!
Next
Reply
Map
View

Click here to load this message in the networking platform