Used to create the TMSFileStream object for working with FILESTREAM data.
function GetFileStreamForField(const FieldName: string; const DesiredAccess: TMSSqlFilestreamDesiredAccess = daReadWrite; const OpenOptions: TMSSqlFilestreamOpenOptions = ; const AllocationSize: Int64 = 0): TMSFileStream;
Contains the existing field name of a VARBINARY(MAX) column.
Determines the mode that is used to access FILESTREAM data.
The following values can be used:
- data can be read from the file.
- data can be written to the file.
- data can be read and written from the file.
Determines file attributes and flags. By default, the file is being opened or created with no special options. The following values can be used:
- The file is being opened or created for asynchronous I/O.
- The system opens the file without system caching.
- The system does not write through an intermediate cache. Writes go directly to disk.
- The file is being accessed sequentially from beginning to end. The system can use this as a hint to optimize file caching. If an application moves the file pointer for random access, optimal caching may not occur.
- The file is being accessed randomly. The system can use this as a hint to optimize file caching.
Determines the initial allocation size of the data file in bytes. It is ignored in read mode. If this parameter is 0, the default file system behavior is used.
The TMSFileStream object for working with FILESTREAM data.
Creates the TMSFileStream object for working with FILESTREAM data of specified column. Transaction must be started before calling this method.
Note that this method requests server to obtain the Win32 compatible file handle for a FILESTREAM data.
To obtain the file handle, the following steps are performed:
getting the current transaction context of a session by calling the GET_FILESTREAM_TRANSACTION_CONTEXT Transact-SQL function. (
obtaining the Win32 file handle by executing the OpenSqlFilestream API. (
You can find more information about working with FILESTREAM data in MSDN at