Bookshelf Home | Contents | Index | PDF |
Siebel VB Language Reference > VB Language Reference > Seek StatementSeek sets the position within an open file for the next read or write operation. SyntaxReturnsUsageIf you write to a file after seeking beyond the end of the file, the file's length is extended. Basic returns an error message if a Seek operation is attempted that specifies a negative or zero position. For files opened in Random mode, position is a record number; for other modes, position is a byte offset. Position is in the range 1 to 2,147,483,647. The first byte or record in the file is at position 1, the second is at position 2, and so on. ExampleThis example reads the contents of a sequential file line by line (to a carriage return) and displays the results. The second subprogram, (general) (declarations) Sub CreateFile Sub Button_Click See Also |
Siebel VB Language Reference |