public UniSequentialFile CreateSequentialFile (string pFileName, string pRecordID, bool pCreateFlag)
This method creates a file for sequential processing and returns
a UniSequentialFile object.
string
pFileName is the name of an existing type 1 or type 19
file.
string pRecordID is a record in
the file. If the record does not exist and if pCreateFlag is true, this method creates a record.
bool pCreateFlag is a flag specifying that the record should or should not be
created if it does not exist. If pCreateFlag is
true, this method creates a record.
If the record cannot be
opened because of an error on the server, CreateSequentialFile throws a UniSessionException, and the UniSession object’s status is one of the following values:
| Value | Description |
|---|---|
| 0 | No record ID was found. |
| 1 | The specified file is not type 1 or type 19. |
| 2 | The specified file was not found. |
This example opens the TEST2 program file for sequential processing:
UniSequentialFile uSeq = uSession.CreateSequentialFile("BP",
"TEST2", false);If this method fails, it throws a UniSessionException.
This method corresponds to the
database CREATE command (if the create flag is set
to true), the UniObjects OpenSequential method, and the BASIC OPENSEQ statement.