VisFileCopy is not working with large files

113 Views Asked by At

I'm working in Centura 3.0 team developer and I want to copy large file

VisFileCopy is not working with large files.

Unfortunately, I couldn't reach any documentation related to maximum allowable data size or the return errors description.

I do some tests and I've discovered it is working fine with files 5.25 GB and I wanna copy file with 11 GB

File Size        State
5.25 GB          Copied
5.62 GB          Not Copied and retrieve Error (-39)

Is there an equivalent function of VisFileCopy working with large files smoothly?

1

There are 1 best solutions below

4
On

Use the Win32API function SHFileOperation found in SHELL32.DLL.

Alternatively to the image below, here is an alternate working version you can download and open into v3.0 . I've tested it in v6.2 and it works just fine. If you can't open the download ( because v3 is too old ) , I'll post up an alternate image, which you'll just have to type in from scratch. But trust me , it does work.

Goto: SQLWindows Advanced file operations: copy, move, rename and delete


1) Declare SHFileOperation in External functions: ( if not already )

enter image description here

2) Declare some constants used by SHFileOperation:

enter image description here

3) Declare your own wrapper ( to replace VisFileCopy ) as an Internal Function:

enter image description here

4) Call your wrapper function with whatever parameters you want ( e.g. include/ exclude a progress bar )

enter image description here