IN applications that i write i use SqlPassthrough
What i want to do is use the thermometer to keep the users happy
How do i do that?
I know how to call the thermometer and update it that's not the problem
The problem is when i issue the SqlExec() the code does not move onto the thermometer update code.
I have played with the SQLSETPROP() changing it so to use sqlmoreresults() but this does not work. It moves onto next line but stops and waits for the SQLEXEC() to finish first.
lnConnect = SQLCONNECT("COMP_B"
SET STEP ON
SQLSETPROP(lnconnect,"BatchMode",.F.)
SQLSETPROP(lnconnect,"Asynchronous",.T.)
loTherm = NewObject("_thermometer","_therm","","Retrieving Data"
lcsql = "SELECT job, operation, expd_unit_run_time, work_centre, milestone FROM wip_job_all_lab" + ;
" WHERE opern_complete <> 'Y'"
lnreturn = sqlexec(lnConnect, lcsql, 'file1')
loTherm.Show() &&it stops here
ln = seconds() + 180
DO WHILE lnreturn = 0
lnreturn = SQLMORERESULTS(lnconnect)
lnprecent = SECONDS()/ln*100
lotherm.update(lnprecent)
enddo
lotherm.Complete()
SELECT * from file1 WHERE milestone = 'Y' INTO CURSOR file1
SQLDISCONNECT(lnconnect)
I think the reason this does not work is the Merant backend server complies to nothing.
What i want to do is use the thermometer to keep the users happy
How do i do that?
I know how to call the thermometer and update it that's not the problem
The problem is when i issue the SqlExec() the code does not move onto the thermometer update code.
I have played with the SQLSETPROP() changing it so to use sqlmoreresults() but this does not work. It moves onto next line but stops and waits for the SQLEXEC() to finish first.
lnConnect = SQLCONNECT("COMP_B"

SET STEP ON
SQLSETPROP(lnconnect,"BatchMode",.F.)
SQLSETPROP(lnconnect,"Asynchronous",.T.)
loTherm = NewObject("_thermometer","_therm","","Retrieving Data"

lcsql = "SELECT job, operation, expd_unit_run_time, work_centre, milestone FROM wip_job_all_lab" + ;
" WHERE opern_complete <> 'Y'"
lnreturn = sqlexec(lnConnect, lcsql, 'file1')
loTherm.Show() &&it stops here
ln = seconds() + 180
DO WHILE lnreturn = 0
lnreturn = SQLMORERESULTS(lnconnect)
lnprecent = SECONDS()/ln*100
lotherm.update(lnprecent)
enddo
lotherm.Complete()
SELECT * from file1 WHERE milestone = 'Y' INTO CURSOR file1
SQLDISCONNECT(lnconnect)
I think the reason this does not work is the Merant backend server complies to nothing.