C/FRONT error: Field contains tens in time

Michael_WeigandMichael_Weigand Member Posts: 14
edited 2008-05-26 in Navision Financials
I am trying to read from the time field in the Object table like this:

oTime = ocx.GetFieldData( htable, hRec, 11 )

c/front displays an error message:

---
C/FRONT error: 10120

C/FRONT error: Field contains tens in time
---

Where's the problem?

Comments

  • Andreas_LundinAndreas_Lundin Member Posts: 91
    Hi

    Maybe the time format in the OCX is defined by an integer number istead of a string holding the data like '12:30:00'. It could be the reason. Hope it is of any help <img border="0" title="" alt="" src="images/smiles/icon_smile.gif" />

    Regards
    Andreas
  • Michael_WeigandMichael_Weigand Member Posts: 14
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Andreas Lundin:
    Maybe the time format in the OCX is defined by an integer number istead of a string holding the data like '12:30:00'.<HR></BLOCKQUOTE>

    I declared the variable for the return value as variant. I don't think the data type is the problem.
  • jbolksjbolks Member Posts: 17
    If I ask for the time I use a String.

    And that works!

    Jan
  • Michael_WeigandMichael_Weigand Member Posts: 14
    I think there's something special about the Object table. Reading from the 'Time' field works as long as 'Geändert' ('changed' or 'modified' in English version?) is false. Strange...
  • dbdb Member Posts: 82
    Check cf.h file:
    typedef DBL_U32 DBL_TIME;
    Time is 32 bit unsigned integer.
  • blintjensblintjens Member Posts: 4
    For some reason (still trying to find out), Navision sometimes stores the time property of the objects in miliseconds as well.

    Try running a report wich rounds the time in the object table:

    Report on Object, On after get record
    v_DateTime[1] := CREATEDATETIME (Date,Time);
    v_DateTime[2] := ROUNDDATETIME(v_DateTime[1],1000,'=');
    v_duration := v_DateTime[1] - v_DateTime[2];

    IF v_duration <> 0 THEN BEGIN
    Time := DT2TIME (v_DateTime[2]);
    MODIFY;
    end;


    Be sure to check modification permission in the object permission table!
    Round the time manually when changing objects and you should be fine.
Sign In or Register to comment.