PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV Mobile 2024 → Time item in database read only error
Time item in database read only error
Started by Ben Clarke, Jan., 15 2017 9:11 PM - 6 replies
Posted on January, 15 2017 - 9:11 PM
Hi,

I'm trying to store a time in a hfsql databaase. Its a time inputed by the user and so is held in a variable before trying to add it to the file. However when trying to write it in the database I get a read only error.

Here is the code:

HSeekFirst(RoadShow,RoadShowID,Form)
IF HFound(RoadShow) THEN
IF EDT_Authorisation = RoadShow.Authorisation THEN
Client_RoadShow.ClientID = ClID
Client_RoadShow.RoadShowID = Form
Client_RoadShow.TrackTime = Time
Client_RoadShow.Comments = Comments
HAdd(Client_RoadShow)
MySelf..Visible = False
ELSE
Info("Incorrect Authorisation","Please get a SAM member to confirm your track time")
END
END

The code is on a button press and causes this error message:

'The "TrackTime" item is read-only.'

Note that I can't ScreenToFile this as it is on an authorisation internal window which shows after entering the information and sending it.

How can I avoid this? I can't find any mention on how to change it.

Cheers,

Ben Clarke
Posted on January, 16 2017 - 12:51 PM
Hi Ben

are you sure you declared that item as a TIME and not a TIMESTAMP?

TimeStamp are filled automatically (htus read only) and are not
supported on mobile to boot

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)

More information on http://www.fabriceharari.com


Le 1/15/2017 à 3:11 PM, Ben Clarke a écrit :
Hi,

I'm trying to store a time in a hfsql databaase. Its a time inputed by
the user and so is held in a variable before trying to add it to the
file. However when trying to write it in the database I get a read only
error.

Here is the code:

HSeekFirst(RoadShow,RoadShowID,Form)
IF HFound(RoadShow) THEN
IF EDT_Authorisation = RoadShow.Authorisation THEN
Client_RoadShow.ClientID = ClID
Client_RoadShow.RoadShowID = Form
Client_RoadShow.TrackTime = Time
Client_RoadShow.Comments = Comments
HAdd(Client_RoadShow)
MySelf..Visible = False
ELSE
Info("Incorrect Authorisation","Please get a SAM member to
confirm your track time")
END
END

The code is on a button press and causes this error message:

'The "TrackTime" item is read-only.'

Note that I can't ScreenToFile this as it is on an authorisation
internal window which shows after entering the information and sending it.

How can I avoid this? I can't find any mention on how to change it.

Cheers,

Ben Clarke
Posted on January, 16 2017 - 11:35 PM
I am quite sure. I cannot see any reason for TrackTime to have issues. What could cause a Time database item to appear read only?
Posted on January, 17 2017 - 11:23 AM
Nothing, hence my question...

Le 1/16/2017 à 5:35 PM, Ben Clarke a écrit :
I am quite sure. I cannot see any reason for TrackTime to have issues.
What could cause a Time database item to appear read only?
Posted on January, 17 2017 - 9:41 PM
Here is exactly how the database file is setup





Its definitely set to a Time variable...
Posted on January, 18 2017 - 1:14 PM
Hi Ben

I looked at your code again, and you may be in the case of a wrong error
message:

TIME is a reserved word in wlanguage (it's a type of variable), so try
to rename that element, whatever it is, in the line:
Client_RoadShow.TrackTime = Time

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)

More information on http://www.fabriceharari.com


Le 1/17/2017 à 3:41 PM, Ben Clarke a écrit :
Here is exactly how the database file is setup






Its definitely set to a Time variable...
Posted on January, 19 2017 - 1:47 AM
That hasn't helped, unfortunately.