PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → WM21 Weird HSave Error
WM21 Weird HSave Error
Débuté par Bill Quinn, 13 mai 2017 01:30 - 2 réponses
Posté le 13 mai 2017 - 01:30
Hi,

I'm creating my first android app and everything works as expected while running from within WM. I generated the app for Android 6.0 and downloaded to my motorola android 7.0 phone. On my phone, I entered data into several config table with no issues. I then proceed to add to another table and I get a strange error. I'm using HFSQL tables with 8-byte Automatic ID (FreqDataHeaderID). The code is:

IF HCreationIfNotFound(FreqDataHeader) = False THEN
Info("create err " + HErrorInfo(hErrFullDetails))
END
IF HReset(FreqDataHeader) = False THEN
Error("hreset " + HErrorInfo(hErrFullDetails))
END

FreqDataHeader.StudentID = gnStudentID
IF HSave(FreqDataHeader) = False THEN
Error("hsave " + HErrorInfo(hErrFullDetails))
END

Info("preopen " + FreqDataHeader.FreqDataHeaderID)

This code is currently being run in the calling procedure for the edit screen. I've tried this in the end of init in the edit screen and get the same result. There is no preceding error.

The error message on the phone is:
hsave Error code: !d!
Level: no error

The "preopen" info message shows 0 for the headerID

The only difference I can see between this table and the ones that do work is this table has a timestamp field set at creation and 2 time fields I set in code.

Any suggestions would be greatly appreciated!

Thanks, Bill
Posté le 13 mai 2017 - 05:31
I've found the issue...I had a Timestamp field in several files including the Header file mentioned above. Once I changed that data type to Date and set its value in code, the code worked on the phone.

Did I miss something in the help file that says a Timestamp data type doesn't work in WM 21?

Bill
Posté le 13 mai 2017 - 16:00
Hi

I confirm that timestamps are not supported in HF mobile, and I don't know if it's in the help or not

Best regards