HMG - SKIP not respected in MySQL Table
Posted: Sun May 17, 2009 1:56 pm
Hi All
I have an issue of SKIP/DBSKIP(1) not respected in a DO WHILE LOOP of a MySQL Table as follows :-
#include "adordd.ch"
#include 'Minigui.ch'
SELECT 0
USE (cDataBase) VIA "ADORDD" alias "FARDAT" TABLE "FARDAT" MYSQL ;
FROM cServer USER cUser PASSWORD cPass
// Properly connected to MySQL Table and value of lastrec() obtained
CalcdepamCounter() // problem function
function CalcdepamCounter()
LOCAL nRecNo
local nCounter:=0
dbgotop()
//
WHILE ! fardat->(eof())
DO EVENTS
nCounter++
msginfo(fardat->fa_no)
nComplete := INT((nCounter/LASTREC()) * 100)
cComplete := LTRIM(STR(nComplete))
MainForm.Progress_1.Value := nComplete
MainForm.Label_001.Value := "Calculating "+ str(nCounter)+'/'+ltrim(str(lastrec()))+CHR(13)+ "Percentage completed "+cComplete + "%"
SKIP // not respected , fardat->(dbskip(1)) and dbskip(1) also not resoected
ENDDO
RETURN nil
Any assistance will be appreciated .
CCH
http://cch4clipper.blogspot.com
I have an issue of SKIP/DBSKIP(1) not respected in a DO WHILE LOOP of a MySQL Table as follows :-
#include "adordd.ch"
#include 'Minigui.ch'
SELECT 0
USE (cDataBase) VIA "ADORDD" alias "FARDAT" TABLE "FARDAT" MYSQL ;
FROM cServer USER cUser PASSWORD cPass
// Properly connected to MySQL Table and value of lastrec() obtained
CalcdepamCounter() // problem function
function CalcdepamCounter()
LOCAL nRecNo
local nCounter:=0
dbgotop()
//
WHILE ! fardat->(eof())
DO EVENTS
nCounter++
msginfo(fardat->fa_no)
nComplete := INT((nCounter/LASTREC()) * 100)
cComplete := LTRIM(STR(nComplete))
MainForm.Progress_1.Value := nComplete
MainForm.Label_001.Value := "Calculating "+ str(nCounter)+'/'+ltrim(str(lastrec()))+CHR(13)+ "Percentage completed "+cComplete + "%"
SKIP // not respected , fardat->(dbskip(1)) and dbskip(1) also not resoected
ENDDO
RETURN nil
Any assistance will be appreciated .
CCH
http://cch4clipper.blogspot.com