https://zorro-project.com/manual/en/data.htm

dataSave does not return anything so how to check for error condition?
Code
dataSave (int Handle, string Filename, int Start, int Num)
Stores the dataset with the given Handle as a binary file. Num records are stored, beginning with the record Start. If both parameters are omitted or zero, the whole dataset is stored. 


I am seeing failures in dataSave where I assume data has been saved correctly but when I try to read the file I get Error 062.
Indeed, the T6 file is not been save in the directory; therefore the error. How do I check for unsuccessful save?

I have attached screenshot of Zorro dataSave error. Using Zorro 2.50.2 on 64 bit Windows 11.

Following is the code snippet

Code
string T6FileName = strf("%s_%4i.t6",strxc(Name,'.',0),LastYear);
string TempName = strf("%s%s",TempFolder,T6FileName);
dataSave(TempHandle,TempName,Start,i-Start);
printf("\nSaved %s file to %s",Name,TempName);

        
int ReadRecords = dataLoad(TempHandle,TempName,7);
if(!ReadRecords) { printf("\nCan't open %s",TempName); return; }
printf("\nOpened file %s",TempName);



Attached Files
Zorro dataSave Error.png (15 downloads)
Last edited by HamzaAhmed; 09/16/22 14:35. Reason: Added detail