Message
 
 
General information
Fórum:
Visual FoxPro
Category:
Programação, sintaxe e comandos
Miscellaneous
ID da thread:
00521938
ID da mensagem:
00522028
Views:
12
Richard,

Strange, but I replicated this behavior too:
local lnHandle
lnHandle = fopen('jobs.dbf',0) && returns 6 (file opens)
? 'First time: '+transform(m.lnHandle)
if lnHandle>0
  ? fclose(m.lnHandle) && return .T. (file closed)
endif  
select 0
use jobs shared in 0
wait window "Let's see..."
lnHandle= fopen('jobs.dbf',0) && returns -1 (unable to open file)
? 'Second time: '+transform(m.lnHandle)
if lnHandle>0
  ? fclose(m.lnHandle) && return .T. (file closed)
endif  
?ferror()
use in select('jobs')
use jobs excl
? fopen('jobs',12) && returns -1 (unable to open file)
use in select('jobs')
>I must be missing something:
>
>All from the command window VFP6 - clean load of VFP.
>
>? fopen('inv_mast.dbf',12) && returns 6 (file opens)
>? fclose(6) && return .T. (file closed)
>select 0
>use inv_mast shared
>? fopen('inv_mast.dbf',12) && returns -1 (unable to open file)
>use in inv_mast
>use inv_mast excl
>? fopen('inv_mast.dbf',12) && returns -1 (unable to open file)
>use in inv_mast
>
>What gives? - I do have Hackers Guide - great reference - I have tried all the other fopen parameters - all return the same for me.
>
>Thank you very much for your help.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Responder
Mapa
View