Reputation: 31
440 DEFPROCsave
450 phonenos=OPENUP("Phonenos")
470 PRINT
480 FOR j= 1 TO counter
490 PRINT#phonenos,contact{(j)}.name$,contact{(j)}.phone$,contact{(j)}.email$
500 FOR f = 1 TO 10
510 PRINT#phonenos,contact{(j)}.response%(1,f)
520 NEXT f
530
540 NEXT j
550 CLOSE#phonenos
560 PRINT "Data saved."
570 ENDPROC
Code to save details from database I'm trying to save what i have entered to a file but the error INVALID CHANNEL AT LINE 490 APPEARS/
Upvotes: 3
Views: 105
Reputation:
If your error is on line 490, one of two things is likely happening.
Your FILEHANDLE for phonenos
did not open.
You could be attempting to access the file from a bad location, it may not exist, or it could be write protected.
Your contact
array is referencing an invalid index item.
Is
counter
going outside the range of the array? Is this a zero (0) or one (1) based array?
Upvotes: 1