Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error File is not open - 1113
Message
De
17/11/2016 06:35:37
 
 
À
16/11/2016 16:08:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
Visual FoxPro
Divers
Thread ID:
01643575
Message ID:
01643597
Vues:
41
>Hi,
>
>I have in my scan...endscan procedure an error 'File is not open'
>The error occurs on line endscan
>procedure (simplified)
>
>select myCursor
>scan
>   if llCondition 
>      create cursor myCursor2  (field1 i, field2 m)
>      select myCursor
>      scatter name m.loCursor2 memo
>      Select myCursor2
>      Append Blank
>      Gather Name m.loCursor2 Memo
>      select myCursor
>   endif
>endscan
>
>
>debugger shows that on start and on end myCursor = alias() also myCursor2 is correctly populated with content of myCursor
>where should I put a try...catch to catch this error?
>
>Regards,
>Koen

Thomas,

After a good night sleep, I decided to replace indeed the gather..scatter with simply a select statement,
so now I work with:
Select myCursor
liCntr = 0
Scan
	If llCondition
*!*	      create cursor myCursor2  (field1 i, field2 m)
*!*	      select myCursor
*!*	      scatter name m.loCursor2 memo
*!*	      Select myCursor2
*!*	      Append Blank
*!*	      Gather Name m.loCursor2 Memo
*!*	      select myCursor
		liCntr = liCntr+1
		liID = myCursor.Id
		lcCursor = "myCursor"+Padl(Transform( m.liCntr ),2,'0')
		Select * From myCursor Into Cursor (m.lcCursor) NOFILTER Readwrite Where myCursor.Id = ?m.liID
	Endif
Endscan
This works, ofcourse O.K. except...
error 1113
in the debugger watch: empty(alias())
no effect, dont know where when this condition is .T. it is always on the last line Endscan, even a break on the endif alias() is still not empty.
'Funny' thing is my errorlog file shows myCursor02 as being the last file used and not myCursor, although in debugger it shows alias()="myCursor"
and also, if you ignore the error, no complaint, VFP just continues the program(s).


Regards,
Koen
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform