General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Setting autoyield to .F. causes problems in working SQL code
I am using a third party Active X Control from DBI Technology called Solutions Schedule 3.0. I first wrote code to query a database and then fill in fields in the control. This code worked fine until I set autoyield equal to .F. Now the code fails with the following error...
Alias 'COLS' is not found. Line #43
Any suggestions would be helpful. Thanks in advance.
This is the section of code that is failing...
SELECT Collections.col_date, Collections.employeeno;
FROM park!Collections;
WHERE ALLTRIM(Collections.route) = ALLTRIM(Sched.route);
ORDER BY Collections.col_date;
Into Cursor Cols
If Reccount("Cols") > 0
Go top
Do While !EOF()
*** THIS LINE EXECUTES SUCCESSFULLY ****
nBarID = Thisform.ctSchedule1.AddKeyTimeBar(nIndexID, ;
0, ; 1440, ;
Thisform.numdate(Cols.col_date), ;
Thisform.numdate(Cols.col_date), 0)
*** THIS IS LINE # 43 WHICH GENERATES
*** "Alias 'COLS' is not found."
*** WHEN autoyield is set to .F.
cHHNum = SUBSTR(TRIM(Cols.employeeno), ;
LENC(TRIM(Cols.employeeno))-2,3)
thisform.ctSchedule1.BarText(nIndexID, nBarID ) = cHHNum
thisform.ctSchedule1.BarTextAlign(nIndexID, nBarID ) = 2
nCount = thisform.ctSchedule1.AddBarStyle(20, 0)
thisform.ctSchedule1.StyleBackColor(nCount) = RGB(0,255,0)
thisform.ctSchedule1.BarStyle(nIndexID, nBarID ) = nCount
SKIP IN Cols
ENDDO
ENDIF
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only