Write large file

In order to introduce the functionality of the FileOpen function, this example gives two processes to demonstrate how to use the function and how much of an advantage the FileOpen function gives you in your file usage times, especially for large files.

The first process FileOpen uses the FileOpen function to get a handle on the file, and then the repeated operations are performed on the file.

The second process NormalFileWrite does exactly the same repeats, but instead of getting the handle, each write is made directly to the file.

You can change the RepeatCounter in each process to compare the access speeds.

To run the sample

  1. Open the FileOpenWrite solution with Linx Designer.
  2. Click on the Settings button.
  3. On the Settings tab change the value of DBConnectionString to the connection string for the NorthWind Database on your computer.
  4. On the Settings tab change the value of FilePathForFileOpen to a valid path on your computer.
  5. On the Settings tab change the value of FilePathForNormalFile to a valid path on your computer.
  6. Open the first Process called FileOpen and click on Run & Debug, run the process and take note of the total time.
  7. Open the second Process called NormalFileWrite and click on Run & Debug, run the process and take note of the total time.
  8. Compare the times of the Processes.

Download

https://linx.software/wp-content/uploads/2017/04/WriteLargeFile-5.zip