Paradox Community

Items in pnews.paradox-programming

Subject:Re: Help with writing tcursor
Date:Fri, 22 May 2020 15:10:02 -0400
From:Kevin Baker <shcsbaker@gmail.com>
Newsgroups:pnews.paradox-programming
Change code to below:

;Compute Month
tc33.open(":PRIV:CT3.DB")
tc33.edit()
tc33.home()

while not tc33.eot()
    tc33."Month" = moy(tc33."Date")
    tc33.nextRecord()
endWhile

msginfo("","Before tc33 close")
tc33.endEdit()
tc33.close()

msginfo("","After tc33 close")



I get the "Before tc33 close" and then the GPV happens.

I commit out tc33.endEdit() - still get GPV

I add tc33.endEdit() and commit out tc33.close() - still get GPV

I commit out tc33.endEdit() AND tc33.close(), now I don't get the 
msginfo Before tc33 close and still get GPV


I change it to:
if not tc33.endEdit() then
    errorShow()
endif

if not tc33.close() then
    errorShow()
endif

now I get the msginfo before, NO GPV and I get the msginfo after.  It 
works with no errors, but not sure I trust it.


Copyright © 2004 thedbcommunity.com