Subject: | Tcursor
| Date: | Thu, 28 Mar 2019 13:16:51 -0800
| From: | Peter <peter@removespamwhiteknight.email>
| Newsgroups: | pnews.paradox-programming
|
Once a tcursor is opened is there is any way tc.edit() can fail?
I used to always do this
if tcu.open(":alias:Atable") then
if not tc.edit() then
tc.close()
endIf
endIf
The problem with if/endif is that if open fails then Pdox err comes up
and I would rather it didn't so I switched to try/endTry
try
tc.open(":alias:Atable")
tc.edit()
onFail
msgInfo("error","error msg")
if tc.isAssigned() then
tc.close()
endIf
endTry
Using try/endTry, will trap a problem with opening but not edit, even if
I put a write lock (from a different machine) on the table the onFail
does not trigger. So I am wondering if it is possible that edit could
ever fail.
Thank you.
Peter
|