Hi everyone
I met a rare situation.
there are program code in attachment.
It was something like following describtion:
1.Inner do while loop work with database B(work area 2) was surrounded in another do while loop.
2.the outer loop work with database A(work area 2).
3.Under specificed condition, record of database a will be locked inorder to process replacement.
4.the record was locked will unlock after replacement process finished.
5.exit loop.
6.back to work area 1 and skip, displaying message depends on EOF().
7. Whenever replacement was executed, EOF() returns .T..
please help!
BEST REGARDS
chen min
Will RLOCK() cause EOF() returns .T. ?
Moderator: Rathinagiri
-
huangchenmin
- Posts: 157
- Joined: Mon Jun 07, 2010 2:24 am
Will RLOCK() cause EOF() returns .T. ?
- Attachments
-
- MissOPD.zip
- (46.74 KiB) Downloaded 225 times
-
- MissOPD.zip
- (46.74 KiB) Downloaded 218 times
Re: Will RLOCK() cause EOF() returns .T. ?
Hi Chen Min,
Can I suggest to you to use this syntax
IF MSOPD->(EOF()) ...
IF CO03L->(EOF()) ...
IF MSOPD->(RLOCK()) ...
DO WHILE !MSPOD->(EOF()) ...
and then test your program?
In other words, I think its' better to use alias everywhere.
Best regards
Can I suggest to you to use this syntax
IF MSOPD->(EOF()) ...
IF CO03L->(EOF()) ...
IF MSOPD->(RLOCK()) ...
DO WHILE !MSPOD->(EOF()) ...
and then test your program?
In other words, I think its' better to use alias everywhere.
Best regards
Luigi from Italy
www.L3W.it
www.L3W.it
- dhaine_adp
- Posts: 457
- Joined: Wed Aug 06, 2008 12:22 pm
- Location: Manila, Philippines
Re: Will RLOCK() cause EOF() returns .T. ?
Hi,
I never encounter such problem with eof() and with rlock() returning logical TRUE. I took a quick glanced on your posted code. Please check your routine prior to calling the function mentioned on the posted code. Also if you can use alias instead of workarea number, that would help you a lot in trouble shooting problem like this. Luigi is also right by prefixing alias name. Oh, well it is more readable to use statement like this: "select MSOPD", as compared to statement "select 1".
use MSOPD alias MSOPD new
use ANOTHER alias ANOTHER new
use THIS alias THAT new
select MSOPD
got top
while !eof()
select MSOPD
dbskip()
end
Like this my friend, the bug is much easier to track. Happy hunting.....
Regards,
Daany
I never encounter such problem with eof() and with rlock() returning logical TRUE. I took a quick glanced on your posted code. Please check your routine prior to calling the function mentioned on the posted code. Also if you can use alias instead of workarea number, that would help you a lot in trouble shooting problem like this. Luigi is also right by prefixing alias name. Oh, well it is more readable to use statement like this: "select MSOPD", as compared to statement "select 1".
use MSOPD alias MSOPD new
use ANOTHER alias ANOTHER new
use THIS alias THAT new
select MSOPD
got top
while !eof()
select MSOPD
dbskip()
end
Like this my friend, the bug is much easier to track. Happy hunting.....
Regards,
Daany
Regards,
Danny
Manila, Philippines
Danny
Manila, Philippines
-
huangchenmin
- Posts: 157
- Joined: Mon Jun 07, 2010 2:24 am
Re: Will RLOCK() cause EOF() returns .T. ?
Thanks for supportsl3whmg wrote:Hi Chen Min,
Can I suggest to you to use this syntax
.....
Best regards
-
huangchenmin
- Posts: 157
- Joined: Mon Jun 07, 2010 2:24 am
Re: Will RLOCK() cause EOF() returns .T. ?
Thanks for supportsdhaine_adp wrote:Hi,
I never encounter such problem with eof() and with rlock() returning logical TRUE. I took a quick glanced on your posted code........
Regards,
Daany