Programming Reference Manual
 
Syntax
 
FPutR handle%, source$, recordnum&
 
Description
Writes source$ to the file, opened with FOpen under handle%, at the calculated position in the file. The filepointer is calculated as follows:
          FilePointer = len(source$) * (recordnum& -1) 
 
Parameter
Description
handle%
A handle to the file, previously opened with the FOpen instruction.
source$
A string that needs to be saved. May also be binary data, since no unicode translations will occur.
recordnum&
The record in the database that is to be updated. the first recordnumber is 1.
See Also
Example
 
Sub Main
Dim File$, Hnd%, rec&
'write contents to a new file
File$ “C:\MYDBASE.DAT”
FCreate File$
Hnd% = FOpen(File$,2,0)'Read/Write, not shared
For rec& = 1 to 1000
FPutR Hnd%, “Hello!”, rec&
Next rec&
'test the file
For rec& = 1 to 1000
Debug.Print FGetR(Hnd%, 6, rec&)
Next rec&
FClose Hnd%
End Sub